Support » Plugin: TPG Get Posts » [Plugin: TPG Get Posts] Boolean category query

  • Resolved Jay Collier


    You mentioned that the plugin can select by multiple categories.

    Could you provide an example of a shortcode formatted to do so, with the results including only those posts which contain all the categories?

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


    There are 2 ways to show posts by category

    1) by category name

    [tpg_get_posts category_name="cat1,cat2"]

    2) by category id

    [tpg_get_posts category="2,4,8"]

    Just want to make sure. In 2, will the results include posts that are in ALL the categories (boolean-and) or in ANY one of the three (boolean-or)?

    Plugin Author cswaim


    In both cases, the logic within a single selection group is OR logic. So posts that meet any one category is selected. If you list multiple selection tags, ie tags=’xxx’ category=’yyy’, this forms an AND condition.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: TPG Get Posts] Boolean category query’ is closed to new replies.