Skip to content
Public Ticket #17326

Previous Post and Next Post in Single Post

Conversation thread

calvinteoh replied

Customer Reply

Got it, thanks for the fast response! I would check it out and use the information to update my posts so that it will appear as expected. Thanks.

calvinteoh replied

Customer Reply

Thanks for the fast feedback! As you have recommended, I have edited:

inc/templates/post_pagination.php

The outcome is now showing post of the same category. 

However, the previous and next post doesn't seems to be based on publication date. So if I clicked at the 1st post, I would expect the next post is the 2nd post. Similarly, 2nd post, the next post is the 3rd post while the previous post is 1st post. 

Can you explain how does the previous and next post arranged?  

PenciDesign Supporter replied

Staff Reply

Hi,

1.Please go to Appearance → Theme Editor, navigate to this file:

inc/templates/post_pagination.php

Find:

$prev_post = get_previous_post();
$next_post = get_next_post();
Replace to:
$prev_post = get_previous_post( true );
$next_post = get_next_post( true );
image.png

2. In case you want to disable this feature, please go to Appearance → Customize → Single Post → General, check the Hide Next/Prev Post Navigation option.

Regards,
PenciDesign.

calvinteoh started the conversation

Conversation Start

Inside a "Single Post", the "previous post and next post" is not showing posts of the same category. Is there a way to change the setting, so that the posts shown are of the same category instead? On top of that, is there a way to remove the previous and next post? 

9009155474.jpg

Want to join this conversation or access attachments? Sign in first.