Support » Plugin: Display Posts - Easy lists, grids, navigation, and more » in one tag but NOT IN another

  • Resolved Adrian Tawfik

    (@adriandemocracychroniclescom)


    [display-posts tag=”citizens-united” posts_per_page=”6″ taxonomy=”tags” tax_term=”corruption″ tax_operator=”NOT IN”]

    I want to show articles from the citizens united tag but not the corruption tag. What am i doing wrong?

    democracychronicles.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    The first issue I see is you’re specifying “tags” as the taxonomy, when it should be “post_tag” (that’s the actual taxonomy name in WordPress).

    But I’m not sure how well the tag parameter will work with a taxonomy query, since the former is a shortcut for the latter. You may need to do multiple taxonomy queries, like:

    [display-posts posts_per_page="6" taxonomy="post_tag" tax_term="citizens-united" taxonomy_2="post_tag" tax_2_term="corruption" tax_2_operator="NOT IN"]

    Adrian Tawfik

    (@adriandemocracychroniclescom)

    Thank you very much for this! I will have to play around with it so that it fits all over my website. I appreciate the help very much. Great plugin for sure!!!

    Adrian Tawfik

    (@adriandemocracychroniclescom)

    I’m sorry but one last request if possible. The code u wrote works. Can u send me one more example of the code u wrote but where two tags are marked “NOT IN”? In other words, just a new code that will show a list of “citizens-united” tag articles that are not marked with “corruption” or “transparency” tags. This would help my website a lot, thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘in one tag but NOT IN another’ is closed to new replies.