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.

I made a theme from PSD to WordPress but the "next"-"previous" buttons are not showing on home page.

Here is the code of single.php:

    <div id="primary" class="site-content">
        <div id="content" role="main">

            <?php while ( have_posts() ) : the_post(); ?>

                <?php get_template_part( 'content', get_post_format() ); ?>

                <nav class="nav-single">

                    <h3 class="assistive-text"><?php _e( 'Post navigation', 'aquaponicfamily' ); ?></h3>
                    <span class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'aquaponicfamily' ) . '</span> %title' ); ?></span>
                    <span class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'aquaponicfamily' ) . '</span>' ); ?></span>
                </nav><!-- .nav-single -->

                <?php comments_template( '', true ); ?>

            <?php endwhile; // end of the loop. ?>

        </div><!-- #content -->
    </div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

What the changes are required?

share|improve this question
    
For Home page content, single.php is not responsible. Please change the code block with index.php or front-page.php codes. –  Mayeenul Islam Jul 7 '13 at 6:52

1 Answer 1

like @Mayeennul said you have your templates mixed up. Generally speaking the home page contains a list of excerpts the_excerpt() with links to individual blog posts that are displayed using single.php.

If you want a single blog post as your home page you could copy single.php and rename it to index.php or front-page.php.

share|improve this answer

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.