Hide posts from specific category from appearing in previous next navigation

Hi aThemes team,

I was wondering if there was a way to prevent blog posts from specific categories appearing as links for “previous” and “next” blog posts at the bottom of a blog post. So far I’ve been able to hide blog posts from certain categories from appearing on my blog directory page with a custom snippet. And I’m using a child theme for Talon Pro to make sure the changes stick.

Any help with this would be greatly appreciated.

Hello there,

Thank you for contacting us about our theme Talon Pro.

It seems likely your question is out of the scope of the theme’s code. Because we use the_post_navigation function for that part. That WordPress core function doesn’t seem to allow us to pass the posts links query to set the result as we want, in your case, exclude specific posts from a choosen category.

I am sorry, we can’t help further with this since it is a function limitation. I’d recommend you try hiring a WordPress coder freelancer or find out an answer from the WordPress.org community support forum at https://wordpress.org/support/.

Regards,
Kharis
aThemes Support

Hi Kharis,

Thanks for the explanation. Guess I’ll have to look into searching for a plugin option. I’d prefer not to as in the past I’ve had issues with bloat and conflicts between plugins. Thanks for the help, though. Appreciate it. :slight_smile:

1 Like

You’re welcome!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis
aThemes Support