Post-navigation per category

Is it possible to limit post-navigation (previous post and next post arrows) to a post-category?

There seems to be a possibility to choose this under blog options in the customizer but there I cannot find it. Any other way of doing this in custom css?

Or, if that’s too complicated: is there a way to remove post-navigation for a specific page using page-id?

I appreciate your help!

Jos

Hello Jos,

It is not a theme issue, but you can check this link:
https://digwp.com/2012/05/post-navigation-author-category/

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.

Hi Roman,

I did some research also and found out that I had to add ‘true’ to two lines in inc/template-tags.php line 54 en 55.

Here you go:

previous_post_link( ‘

%link
’, ‘%title’, true );
next_post_link( ‘
%link
’, ‘%title’, true );

Problem solved, but question remaining: is there a code to put into custom css to get this done?

If not, I’ll have to add these lines again whenever there is an update for Sydney.

Jos

Hello Jos,

is there a code to put into custom css to get this done?

No, you can’t limit post navigation to category using CSS.

Or, if that’s too complicated: is there a way to remove post-navigation for a specific page using page-id?

This can be done with CSS, but please create a new topic to keep forum in good order and make it easier to help you.

If not, I’ll have to add these lines again whenever there is an update for Sydney.

You can try to override that function in a child theme or using Code Snippets plugin, here is a relevant tutorial:

Kind Regards, Roman.

Thank for all your help, Roman.

I’m searching for the best route to take and then make a new topic of that.

Thanks so far!

Jos

Okay, you are welcome Jos!

Kind Regards, Roman.