• Resolved 82tenten

    (@82tenten)


    I found the code in my template (Bueno Theme) for the previous and next post links on my singlepost.php

    I want this to be changed to STAY WITHIN THE SAME CATEGORY when the user clicks next. That way it doesn’t take them to the next post by date. This is because I have an anime site and each category is posts containing episodes of an anime. I want them to be able to click through to the next episode without ending up at some random other post I have made.

    <div class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">←</span> %title' ) ); ?></div>
    
    <div class="nav-next"><?php next_post_link( '%link', __('%title <span class="meta-nav">→</span>') ); ?></div>

    Does this request make sense?

    Also are there any other pages I might need to update this code as well? Maybe for archive functions?

    I am pretty new to wordpress. If anyone has experience building an anime site with WP and can help me with other areas, please email me at [contact details moderated]

    This task right here is my most urgent one though. Without this fix I am kinda screwed….

    -Chelsea (animepanda.net)

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fixing it so previous and next links stay within same category’ is closed to new replies.