• Resolved L-in-J

    (@l-in-j)


    Is it possible, using shortcode, to show posts that are related by a custom taxonomy term but are only from one specific category?

    For example, see this page of my site: https://port-sebastian.com/kiersten-and-abbeys-road-trip/ . The post is in the category “episodes” and includes the term “the-big-giant-people-world” in my taxonomy “sets”.

    In the “See more about characters…” tab in the post, under “Sets used in this episide”, I would like the results to be posts that use the same terms as this post in taxonomy “sets” AND are in the category “the-sets”. I am getting all posts with the term “the-big-giant-people-world” in taxonomy “sets” from all categories (including other “episodes” posts, which I don’t want).

    Thank you!

    https://www.ads-software.com/plugins/related-posts-by-taxonomy/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author keesiemeijer

    (@keesiemeijer)

    Hi L-in-J

    Have you tried it with the taxonomies attribute?
    https://keesiemeijer.wordpress.com/related-posts-by-taxonomy/#taxonomies

    Thread Starter L-in-J

    (@l-in-j)

    Thank you for your reply. I did try the taxonomy attributes. I also tried “include” and “exclude” and I just can’t get it to limit the results to only posts from the specified category.

    Plugin Author keesiemeijer

    (@keesiemeijer)

    So if I understand correctly you want posts from the sets taxonomy that also have the the-sets category?

    Thread Starter L-in-J

    (@l-in-j)

    Sorry I’ve been away from working on this for a while.

    What I need is to be able to show related posts that are related by a specific taxonomy, which I can do now, but then I also need to be able to exclude categories (or include only one category in this case).

    Another example besides the “sets” example can be seen on the same page, https://port-sebastian.com/kiersten-and-abbeys-road-trip/. If you go to the tab that says, “Click for more about characters / dolls / sets in this episode” and look at “Characters appearing in this episode”, I am wanting this to show only posts that are related by my taxonomy “character_names” AND are in the category of “character-bios”. (This is also returning results from categories “episodes” and “businesses-employers” that use the same character names. The “character-bios” posts are the three showing dolls’ faces.)

    I see that your shortcode options include exclude_terms, include_terms, and exclude_posts. Is it possible to add something like ‘include_categories’ and ‘exclude_categories’? I think that would solve my problem.

    Thanks!

    Thread Starter L-in-J

    (@l-in-j)

    P.S. I’m having trouble getting the shortcode to work, so I’m using the widget. Can you please add the include and exclude options for categories to the widget?

    (Thanks again!)

    Thread Starter L-in-J

    (@l-in-j)

    I was able to get the results I wanted by creating custom post types for my character bios, episodes, and sets, etc.

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can I show posts related by custom taxonomy term but only from one category?’ is closed to new replies.