Black Friday sale! Get 25% off WPSP Pro! Discount automatically applied at checkout.

[Resolved] Possible to Filter by a Category AND a Tag?

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Possible to Filter by a Category AND a Tag?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #14917
    Bodie J
    Participant

    Hello!

    I am attempting to use WPSP to filter a custom post type that has both Categories (the area of the organization) and tags (I have a tag for each year: 2020, 2019, etc).

    What I would like to do is filter by both the area AND the year, but there is only the option to do either a category or a tag.

    Is it possible to configure the shortcode for both a category and a tag?

    Thanks!

    #14933
    Tom
    Keymaster

    Hi there,

    According to this, you should be able to do this:

    [wp_show_posts id="123" settings="category_and=yourcategoryname&tag__in=yourtagname"]

    #14937
    Bodie J
    Participant

    Thanks so much Tom!

    Is there anything I should set or not set within the WPSP Options so as not to conflict here? Do I choose anything under the Taxonomy setting or do I leave it blank?

    #14943
    Tom
    Keymaster

    You should be able to leave the blank, the inline settings overwrite the in-Dashboard settings 🙂

    #14945
    Bodie J
    Participant

    I was overthinking it. I just set one of the Taxonomies in the Dashboard settings and used the other in the shortcake. Works great!

    Thanks again!

    B

    #14947
    Bodie J
    Participant

    My laptop tries so hard to be helpful, but shortcake is just so far from shortcode.

    #14971
    Tom
    Keymaster

    At least it got the short part right. Glad I could help!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.