Previous Next Buttons for Category

Community Forums Forums Design Tips and Tricks Previous Next Buttons for Category

This topic is: not resolved

This topic contains 4 replies, has 4 voices, and was last updated by  Susan 2 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #49809


    I am working on a site for a client using the News theme. (

    For the Featured Tabbed Widget area, the client would like to have previous and next buttons leading from one post to the next in the same category, similar to those seen on this site:

    Does anyone know of a plugin which would accomplish this, or can someone point me in the direction of a tutorial to accomplish this?

    Edited to add: I’ve seen the Genesis Post Navigation Plugin, but it doesn’t seem to work correctly (nor can I see how to modify the text – default is the post name):


    Susan @ One Happy Studio I offer theme customizations I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts


    If you only want the links to apply to posts in one category, you’ll need to use a conditional tag.

    Here’s 2 examples which you may need to tweak.

    Change the hook if needed.

    This uses HTML 5 hooks

    I think you could create those links manually using the next page tag


    David Chu

    A couple related thoughts. I just tried that Genesis plugin. I had to hack it to get it to activate in Genesis 2 beta. :-) But no joy, it didn’t display anything anyway. So it’s a non-starter for Genesis 2, at least as it is now.

    I swapped back to Genesis 1.9, and it worked, and was, um, very springy upon mouseover. :-) But it didn’t give the center spot in your example telling where you were, so it’s not really like your example page.

    You could certainly use Brad’s approach. Another way would be to use Pagenavi, which I like, but it requires some mild template editing or use of hooks. The nice thing about this plugin is that it gives many display options that are not too “codey” to edit.


    Dave Chu ยท Custom WordPress Developer – likes collaborating with Designers




    Just a note, Brad’s code is pretty good, but it can be modified to show the link on all posts but only showing the previous/next link for posts in the same category. You can see the arguments in the codex

    So you would end up with something like this

    add_action( ‘genesis_after_post_content’, ‘my_post_nav’, 5 );
    function my_post_nav() {
        if( ! is_single() )
        previous_post_link(‘<span class="single-post-nav previous-post-link">%link</span>’, ‘Previous in category’, TRUE);
        next_post_link(‘<span class="single-post-nav next-post-link">%link</span>’, ‘Next in category’, TRUE);

    You can do a lot more with it than just that too. You can also do some cool stuff with images and add the post title and other HTML markup so that your links can have all kinds of cool styling.

    I’ve even done something custom with it on my blog to pull in a custom image size and use tags instead of categories. This took some pretty hackish custom code and it doesn’t play nice if you aren’t using categories the way I do to create series, but it works really well for my site.



    Thank you, gentlemen! I’ll see how I go! :)

    Susan @ One Happy Studio I offer theme customizations I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

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

You must be logged in to reply to this topic.