• 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();

Viewing 3 replies - 1 through 3 (of 3 total)
  • looks like the code is based on Twenty Fourteen
    – can you confirm that you are working with a child theme of Twenty Fourteen?

    the showing for example of the ‘content sidebar’ depends on any active widgets being present in the respective widget area;
    there might be other factors supressing the sidebar…

    can you provide a live link to a page using this template?

    Thread Starter Bruce

    (@bnowthen)

    Thanks for the response, alchymyth.

    Yes, I am using a Twenty Fourteen child theme.

    I tired publishing the page as under construction so I could give you a link, but although it is marked as published in the page editor, it does not show up in the horizontal menu. But here is a link to the site.
    Integral Visioneers

    Besides missing the side bar, the edit link at the bottom of the page is not at the bottom of the page, but a couple lines up from the bottom in the text of the page. And there is about 10 inches of blank space below the comment box. So there are multiple problems with my effort at creating a page template.

    Hi. I am trying fit a job board in to my website, but can′t find the right place to put the in the code?

    <div id=”primary” class=”content-area” style=”width:1000px”>

    Can you help me so that it will fit in this page?

    https://www.houseofrecruitment.dk/job1-4/

    B R Michael

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Page Template Sidebar not showing’ is closed to new replies.