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 want to add a code in my theme to show a Next/Previous link below the post but within the same category. I Don't need a thumbnail but if possible I would appreciated, still that's not important right now. Right now I just want to insert a code(s) to one of my PHP scripts so that it would show a next/previous link in the post.

I search on google and find some stuff But I don't know how to use them. For example, I don't know how's the next_posts_link or previous_posts_link works. Because my theme don't have the LOOP.

I use many plugins but soe doesn't work for me and the one that work doesn't show on Mobile version. Right now the one that work for me is the WP Single Post Navigation Within Category Plugin.

My website is a Movie Episode site so I want to be able to let visitors to click next to the next episode within the same Series/Category.

If there's anything you can help please, Help.

share|improve this question
add comment

1 Answer 1

There are the core functions next/previous_post_link() that accept several arguments. The 3rd is the one that triggers in_same_cat. So if you set that one to TRUE, then you'll only get posts that are in filed under the same category.

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.