Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Tony Dopun
Tony Dopun
351 Points

Sidebar not showing up on refresh

Following the video very closely, I'm noticing on the step where Zac adds the primary & secondary column HTML, on refresh the sidebar is not rendering for me.

Things I've confirmed: 1) CSS is being queued correctly via the functions.php file. Literally went line by line to confirm all was in order. 2) I did catch the closing div tag that Zac left out below the secondary column comment.

Any thoughts on why this could be occurring? I'll place my code below. Cheers.

*page-sidebar-left.php

<?php /* * Template Name: Left Sidebar */ ?> <?php get_header(); ?> <section class="two-column row no-max pad"> <div class="small-12 columns"> <div class="row">

        <!-- Primary Column -->
        <div class="small-12 medium-7 medium-offset-1 medium-push-4 columns">
            <div class="primary">

                <!-- The Loop -->
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

                <h1><?php the_title(); ?></h1>
                <p><?php the_content(); ?></p>

                <?php endwhile; else : ?>
                    <p><?php _e('Sorry, no pages found.'); ?></p>
                <?php endif; ?>

            </div>
        </div>

        <!-- Secondary Column -->
        <div class="small-12 medium-4 medium-pull-8 columns">
            <div class="secondary">
                <h2 class="module-heading">Sidebar</h2>
            </div>
        </div>
    </div>
</div>

</section> <?php get_footer(); ?>

Tony Dopun
Tony Dopun
351 Points

Not sure why my code paste is funny on the page. x_x

1 Answer

Hi Tony,

Did you make sure that the page template being used was left-sidebar? Also is the footer showing up with just the sidebar missing?

Thanks, Mark

Tony Dopun
Tony Dopun
351 Points

Hi Mark,

Thanks for the reply. Yes, left-sidebar was selected and no the footer appeared to be missing also. Hm..