Skip to main content
3 of 6
added 250 characters in body
Chip Bennett
  • 55.1k
  • 8
  • 90
  • 170

Background of default template showing instead of the background of custom page template

Plugins were not working for my custom page template, found out that I needed to put WP_head() and WP_footer(), so did that and the plugins started to work. But now the background changed to that of the default template.

If I remove wp_head(), the custom template's background comes back, but plugins do not work anymore. If I use get_header(), logos, menus,background, etc. floods the custom page template, which I don't want.

Please help.

Here are the codes:

<?php
/*
Template Name: OldSkool
*/
?>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <title>Salesletter Template</title>
 <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/OldSkool-src/style.css">
<style type="text/css">
<!--
.style1 {
    font-size: 24px;
    color: #000000;
}
.style2 {color: #FF0000}
.style3 {
    font-size: 14px;
    color: #333333;
}
.style4 {color: #990000}
.style4 {   font-size: 18px;
    font-weight: bold;
}
.style9 {font-size: 16px}
.style7 {font-weight: bold; color: #990000; font-size: 18px;}
.style10 {color: #999999}


</style>
<?php
function mypage_head() {
    echo '<link rel="stylesheet" type="text/css" href="'.get_bloginfo('template_directory').'/OldSkool-src/style.css">'."\n";
}
add_action('wp_head', 'mypage_head');
?>
<?php wp_head(); ?>

<body>
<div id="wrapper">
  <div id="header">
      
  </div>
   <div id="content">
     <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
        <?php the_content('Read the rest of this entry &raquo;'); ?>    
        

    <?php endwhile; else: ?>

        <p>Sorry, no posts matched your criteria.</p>

        <?php endif; ?>
  </div>
  <div id="footer">
      <strong><?php wp_footer(); ?><a href="http://www.planstoprosperity.com" style="color:#FFFFFF" target="_blank"><font color="#FFFFFF"></a></font></strong>
  </div>
</div>
</body>
</html>
Seal
  • 11
  • 1