Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Im using the blankslate template theme and have a sidebar which i would like to use throughout the website.

On my sidebar on the homepage i have a widget called latest posts with the latest post snippet and a read-more link. When this is clicked, the user should be able to view the single post on a new page with the header, footer, bottom/top nav and sidebar. At the moment the sidebar/footer and bottom nav are missing.

I have deactivated the widget and used Wordpress original and this still does not work (so i know its not a sidebar widget bug). If i move the footer or sidebar tags up in the template say next to the header they show but the post is below so i know its something to do with the single post function?

Here is my index template below:

<?php get_header(); ?>
<?php get_template_part( 'nav', 'above' ); ?>
<?php while ( have_posts() ) : the_post() ?>
<?php get_template_part( 'entry' ); ?>
<?php get_sidebar(); ?>
<?php endwhile; ?>
<?php get_template_part( 'nav', 'below' ); ?>
<?php get_footer(); ?>

Which i want the single page template to be like but instead of all the posts the single post... The single post template i have so far is:

<?php get_header(); ?>
<?php get_template_part( 'nav', 'above-single' ); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'entry' ); ?>
<?php get_sidebar(); ?>
<?php endwhile; endif; ?>
<?php get_template_part( 'nav', 'below-single' ); ?>
<?php get_footer(); ?>

I have moved everything about and still no luck. If anyone could give me any guidance i'd appriciate it. Thanks.

Update: I've just realised my tool bar goes when i also access this page - not sure if this will help towards my query.

share|improve this question
    
I believe get_sidebar() should be outside the loop - meaning move it after the endwhile;. Have you tried that? –  Michelle Feb 22 '13 at 17:57
    
I'd guess there is an error in your single.php file. Please add debugging information to the question. –  s_ha_dum Feb 22 '13 at 18:18
    
I've tried added it both in and out the loop, when the loop is removed from the single.php everything works so I assume its something to do with that. I will post any errors I may have when I get back to my laptop. Thanks for replying –  Shimsham84 Feb 22 '13 at 21:59
add comment

1 Answer

up vote 0 down vote accepted

When checking each template include, the single footer contained an error. To resolve this, i duplicated the code from the index footer and amended for the single template. Thank you for your replies.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.