WordPress.org

Ready to get started?Download WordPress

Forums

ELI's Related Posts Footer Links and Widget
[resolved] related posts by tag only in specific category (2 posts)

  1. streettb
    Member
    Posted 1 year ago #

    Is it possible to amend the plugin's code so that if one is looking at single pages in a specific category, only related posts (by tag) within that category are shown?

    (For other categories besides the specific category, all related posts by tag regardless of category could be shown).

    http://wordpress.org/extend/plugins/spostarbust/

  2. Eli
    Member
    Plugin Author

    Posted 1 year ago #

    It would be a little tricky but it can be done.

    Basically you need to modify the SPOSTARBUST_query_related_posts function so that accept some additional optional params for this catagory. Then add the params to the $tags_query array (if passed).

    Then just test for that category in the SPOSTARBUST_related_links_on_posts or the widget function and pass the extra param if it was in that category.

    Hope that helps. Let me know.
    I'm not in a position to donate any of my time to code changes for this free plugin right now. I've put in a lot of work already and only gotten a couple small donations over the last year. got to work on stuff that pays my bills right now.

    Aloha, Eli

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic