Page Template Sidebar not showing
-
The page I am having trouble with is a draft.
I copied this page template below and commented out what I didn’t want. I added in the sidebar code, copied from page.php. But the sidebar still does not show up. Can anyone tell me what I’m missing to make the sidebar show? Here is the code without the commented out sections.<?php
//Template Name: Home Page Template
get_header(); ?><div id=”main-content” class=”main-content”>
<style>
.site-content .entry-header, .site-content .entry-content, .site-content .entry-summary, .site-content .entry-meta, .page-content, .hentry, .entry-content {
max-width: 1000px !important;
}
</style><div id=”primary” class=”content-area”>
<div id=”content” class=”site-content” role=”main”><?php
// Start the Loop.
while ( have_posts() ) : the_post();// Include the page content template.
get_template_part( ‘content’, ‘page’ );// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
endwhile;
?></div><!– #content –>
</div><!– #primary –>
<?php get_sidebar( ‘content’ ); ?>
</div><!– #main-content –><?php
get_sidebar();
get_footer();
- The topic ‘Page Template Sidebar not showing’ is closed to new replies.