Adding previous/next to the bottom of single post pages

Community Forums Forums Design Tips and Tricks Adding previous/next to the bottom of single post pages

This topic is: not resolved

This topic contains 6 replies, has 3 voices, and was last updated by  lovebugs 2 months, 1 week ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #114034

    lovebugs
    Participant
    Post count: 9

    I have the code that I added using simple hooks to the space for after post content:

    <div class="navigation">
    <div class="alignleft">
    <?php previous_post('&laquo; &laquo; %',
    'Toward The Past: ', 'yes'); ?>
    </div>
    <div class="alignright">
    <?php next_post('% &raquo; &raquo; ',
    'Toward The Future: ', 'yes'); ?>
    </div>
    </div>
    
    <center><img src="http://karenard.com/blog/wp-content/uploads/2013/08/flowerdivider3.jpg"></center>

    it did what I wanted it to do, but it also added it to the home page. Is there a way to turn it off on all pages except single post pages?

    thanks!

    http://karenard.com/blog
    #114045

    braddalton
    Participant
    Post count: 9782

    No need to use that code.

    Simply add this to your functions file

    add_action( 'genesis_entry_footer', 'genesis_prev_next_post_nav' );
    

    Only works on HTML 5 themes


    #114392

    lovebugs
    Participant
    Post count: 9

    i don’t think prose is an HTML 5 theme though – I tried adding this but nothing happened.

    #114396

    braddalton
    Participant
    Post count: 9782

    Yeah, Only works on HTML 5.


    #114414

    genwrock
    Member
    Post count: 586

    try this once

    add_action( 'genesis_after_post', 'genesis_prev_next_post_nav' );


    My Genesis Child Themes Work | Please Follow Me on Twitter If I’ve helped.

    #114467

    lovebugs
    Participant
    Post count: 9

    thanks! That worked perfectly.

    #114471

    lovebugs
    Participant
    Post count: 9

    Is there a way to center this, or have the right side one aligned right? It doesn’t look quite right:

    http://karenard.com/blog/los-angeles-maternity-photography-2/

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.