Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #4542019
Filter previous / next post navigation by category and tag
Open

Comments

  • Jeroen started the conversation

    Hello,

    On single post pages, the theme currently shows a “Previous article” and “Next article” navigation.
    At the moment, these links only follow the general post order.

    I would like to add a setting (or customization) so that this navigation only links to posts that:

    1. Belong to the same category, and

    2. Share at least one identical tag with the current post.

    Reason:
    Some posts are part of a chronological or narrative series (using a shared tag), while other posts in the same category provide background or contextual information. I want the previous/next navigation to respect the logical order of the series, without jumping to related-but-out-of-sequence background articles.

    Ideal behaviour:

    • Previous / Next posts are selected only from posts that match both category and tag.

    • If no matching post exists, the navigation can either be hidden or fall back to category-only (optional).

    Could you let me know:

    • If this is already possible via theme settings or hooks?

    • Or which template / function controls this navigation, so it can be customised?

    Thanks in advance.

  •  3,073
    PenciDesign replied

    Hi,

    Unfortunately, there is no hook, filter, or option available for customization in the current version of Soledad/WordPress. If you would like to modify it, you will need to copy the parent theme file to the child theme (if your site is using a child theme).

    wp-content/themes/soledad/inc/templates/post_pagination.php

    To:

    wp-content/themes/soledad-child/inc/templates/post_pagination.php

    Regards,
    PenciDesign.