• Resolved NCompass

    (@ncompass)


    Hi there,

    Is it possible to pull posts with both a specific cateogry AND a specific tag.

    I’ve been crawling through the docs but cant seem to figure a way to do both..

    Thanks
    Guy

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author johnzenausa

    (@johnzenausa)

    Yes just use the following parameters

    taxonomy='specific_category,specific_tag'

    But use actual tag and category name of course.

    Plugin Author johnzenausa

    (@johnzenausa)

    Okay if you mean it must be in both to qualify it would be the following parameter.

    must_be_in_taxonomies_only='specific_category,specific_tag'

    which means if they are not in both they won’t be shown.

    Thread Starter NCompass

    (@ncompass)

    Thank you for the reply.

    I had tried this — but its not quite what im after.

    It would pull a post belonging to category “A”.
    And a different post belong to Tag “B”.

    Id like it to pull a post belonging to category “A” that is also tagged “B”.

    Ultimately would be great if it could go a little further than that.
    Say a post with category “A” that is also tagged “B” or “C”.

    Sort of an AND OR relationship setup.

    (A and (B or C)).

    Thread Starter NCompass

    (@ncompass)

    I’ve tried to be creative and use Taxonomy Offset to kind of achieve this..

    So i have
    taxonomy='tag-a,tag-b' taxonomy_type="tag" pulling the wanted tags

    and then
    taxonomy_offset_names='unwanted-category-slug1,unwanted-category-slug-2' taxonomy_offset_type='category'

    in an attempt to push the unwanted categories off the feed.

    The offset doesnt seem to work however – I cant seem to make any change to the feed at all..

    Ideally I’d want the opposite of an offset.. to guarantee my wanted category is shown — and those posts have either tag a or tag b.

    A master filter and subfilter.

    • This reply was modified 2 years ago by NCompass.

    Hi!

    I have the same problem as NCompass, i try to filter my posts with a category and a tag.
    I want to pull posts with a AND Relation (posts belonging to category “A” that are also tagged with a tag “B”)

    I tried to do this with this shortcode but no results at the end :
    [netsposts taxonomy_type=”tag,category” must_be_in_taxonomies_only=’category_1,tag_1′ paginate=’true’]

    Do you have a solution ?
    Thanks !

    Plugin Author johnzenausa

    (@johnzenausa)

    @ncompass @clark14kent
    I will look in to this and have an answer by Tuesday. Or at least to attempt to have an answer by Tuesday. I’ll do some experimenting on my side why this isn’t working and work on creating an and/or relationship also.

    Plugin Author johnzenausa

    (@johnzenausa)

    Andrey the co-developer says it’s impossible to implement right now because the core isn’t setup that way.

    Okay, thanks for your answer

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Is it possible to pull posts from category and tag.’ is closed to new replies.