• Resolved macuhail

    (@macuhail)


    I am trying to use a pods shortcode that includes a where clause that queries a custom taxonomy field.

    The pod has the following fields title, image and portfolio category (portfolio_category is the taxonomy field). I have tried the following shortcode, but it is not working: [pods name="portfolio_image" limit="12" where="portfolio_category.meta_value = 'Beauty'" pagination="true" template="Portfolio"][/pods]

    It works fine without the where clause.

    Thank you for any suggestions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Jim True

    (@jimtrue)

    If it’s taxonomy you need to use portfolio_category.name since you’re actually querying the Name of the taxonomy. For slug, you’d use portfolio_category.slug

    We have a table at the bottom of our Find Documentation page that should help with naming style for those where clauses

    Thread Starter macuhail

    (@macuhail)

    I tried portfolio_category.name=’Beauty’ and it still didn’t work. Just to clarify, the custom taxonomy name is portfolio category and “Beauty” is one of the terms (categories) (ex: Beauty, Fashion, etc) in the taxonomy.

    Thread Starter macuhail

    (@macuhail)

    It turns out it did work. I am using the Divi theme and for some reason I needed to save the section and come out of it and re-enter the section in the Divi builder (sometimes a couple of times) to get the data to show up.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Need help with where clause’ is closed to new replies.