Title: Background only template issue
Last modified: August 30, 2016

---

# Background only template issue

 *  [Elbe06](https://wordpress.org/support/users/elbe06/)
 * (@elbe06)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/background-only-template-issue/)
 * Hi,
 * I have created the following Background only template
 * _[ Moderator note: Code fixed, please wrap code in [backticks or use the code button](http://codex.wordpress.org/Forum_Welcome#Posting_Code).]_
 *     ```
       <?php
       /**
       	Template Name: Page with background only
   
       */
       ?>
       <html>
       <head>
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
       <style type="text/css">
       body { background-color: #666666;}
       #page-content { width: 90%; margin: 5px auto; }
       #page-content p { font-size: 1em; font-family: Georgia; line-height: 1.5em; text-align: justify; }
       </style>
       <title><?php wp_title( '|', true, 'right' ); bloginfo('name'); ?></title>
       <?php wp_head(); ?>
       </head>
   
       <body>
       <?php while (have_posts()) : the_post(); ?>
       <div id="page-content">
       	<?php the_content(); endwhile; ?>
       </div>
       </body>
       </html>
       ```
   
 * that I use to open a page via Lightbox plus colorbox.
    this works ok, except 
   inserted stuff like sololoquy or unitegallery don’t work.
 * Link here: [http://laparare.fr/les-chambres/](http://laparare.fr/les-chambres/)
   and “Chambre la chapelle”
 * If I use the default page template everything works fine…
 * What am’I doing wrong in my template?(I’m a real beginner with WordPress!)
 * Thanks for help.
 * LB

Viewing 1 replies (of 1 total)

 *  Thread Starter [Elbe06](https://wordpress.org/support/users/elbe06/)
 * (@elbe06)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/background-only-template-issue/#post-6240319)
 * Hi,
 * after many hours, here is how I fixed it…
    The my new template for NO footer 
   and NO navigation bar is:
 *     ```
       <?php
       /**
       	Template Name: Page with empty footer
       */
       ?>
       <?php get_header('2'); ?>
       <html>
       <head>
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
       <style type="text/css">
       body { background-color: #666666;}
       #page-content { width: 100%; margin: 2px auto; }
       #page-content p { font-size: 1em; font-family: Georgia; line-height: 1.5em; text-align: justify; }
       </style>
   
       </head>
   
       			<?php
   
       			if (have_posts()) {
       				/* Start the Loop */
       				while (have_posts()) {
       					the_post();
       					get_template_part('content', 'page');
       				}
       			} else {
       				theme_404_content();
       			}
       			?>
       			<?php get_sidebar('bottom'); ?>
       <?php get_footer('2'); ?>
       ```
   
 * And my footer-2and header-2 are:
 * Footer-2.php
 *     ```
       <?php
        /**
         * The template for displaying the footer.
         *
         * Contains footer content and the closing of the
         * #main and #page div elements.
         *
         * @package WordPress
         * @subpackage Twenty_Thirteen
         * @since Twenty Thirteen 1.0
         */
        ?>
   
                   </div><!-- #main -->
   
           </div><!-- #page -->
   
           <?php wp_footer(); ?>
        </body>
        </html>
       ```
   
 * And header-2.php
 *     ```
       <?php global $wp_locale;
       if (isset($wp_locale)) {
       	$wp_locale->text_direction = 'ltr';
       } ?>
       <!DOCTYPE html>
       <html <?php language_attributes(); ?>>
       <head>
       <meta charset="<?php bloginfo('charset') ?>" />
       <!-- Created by Artisteer v4.3.0.60745 -->
       <meta name="viewport" content="initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no, width = device-width" />
       <!--[if lt IE 9]><script src="<?php get_template_directory_uri() ?>/html5.js"></script><![endif]-->
   
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url') ?>" media="screen" />
       <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
       <?php
       remove_action('wp_head', 'wp_generator');
       if (is_singular() && get_option('thread_comments')) {
       	wp_enqueue_script('comment-reply');
       }
       wp_head();
       ?>
       ```
   
 * Hope this can help
    LB
 *     ```
       </head>
       <body <?php body_class(); ?>>
   
       <div class="art-sheet clearfix">
   
       <?php if(theme_has_layout_part("header")) : ?>
       <header class="art-header<?php echo (theme_get_option('theme_header_clickable') ? ' clickable' : ''); ?>"><?php get_sidebar('header'); ?></header>
       <?php endif; ?>
   
       <div class="art-layout-wrapper">
                       <div class="art-content-layout">
                           <div class="art-content-layout-row">
                               <div class="art-layout-cell art-content">
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Background only template issue’ is closed to new replies.

## Tags

 * [soliloquy](https://wordpress.org/support/topic-tag/soliloquy/)
 * [template](https://wordpress.org/support/topic-tag/template/)

 * 1 reply
 * 1 participant
 * Last reply from: [Elbe06](https://wordpress.org/support/users/elbe06/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/background-only-template-issue/#post-6240319)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
