• Resolved blindtexth

    (@blindtexth)


    Hi, I am building a website for concerts.
    The we have for each sponsor a specific type of sponsorship: support, festival-partner, cooperation …
    Now I want to show on one page in a first area only the sponsors who are supporting. In an area below only the sponsors who are festival-partner should show up.
    With list item can I only choose the Pod and the template but not the category/taxonomy for displaying specific entries?

    Or is there another way to separate vie categories on one page?

    Hugs, Carsten

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    You can use the where property to filter based on categories or fields.
    It actually uses Pods::find(): https://docs.pods.io/code/pods/find/

    Cheers, Jory

    Thread Starter blindtexth

    (@blindtexth)

    Hi Jory, thanks for your reply.

    I am still a bit lost … when I created the taxonomy: »sponsors«
    and subcategories like: festivalsponsor, supporters and cooperations,
    what exactly do I type into the »where-field« within widget »Pods – List Items«
    to show only the category on a specific page?

    Since I’ve chosen:
    Pod = Sponsors
    Template = Sponsors_List
    .
    Where = ?

    “category.name = ‘My Category'” (?)
    equals
    “sponsors.festivalsponsor = ‘Festivalsponsor'” (?)

    When I leave the »where« field empty, it shows all entries.

    Why is it so difficult to find any information, what to actually fill in those fields?

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @blindtexth

    Sorry, you cannot traverse into relationships for the where arg since that is SQL.

    category.name = 'My Category'
    Equals to:
    sponsors.name = 'Sponsor' (?)

    sponsors would be the slug of the taxonomy (not the term!).
    name is the actual database table column.

    So for a subcategory you could just do the following:
    sponsors.name = 'Name of your subcategory'
    Or
    sponsors.slug = 'slug-of-your-subcategory'
    Or
    sponsors.term_id = 12
    Or for multiple categories:
    sponsors.slug IN ( 'term-slug-1', 'term-slug-2', 'term-slug-3' )

    You can find some more examples using a shortcode here:
    https://docs.pods.io/displaying-pods/pods-shortcode/

    Hope this helps!

    Cheers, Jory

    Thread Starter blindtexth

    (@blindtexth)

    Hi @keraweb

    thank you for your help … it works with:

    »where« – <sponsors.slug = ‘festivalsponsor’>

    Highly appreciated!!

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @blindtexth

    You’re welcome! The best way to say thanks is to leave a 5 star review at https://wordpress.org/plugins/pods/ and (if you’re feeling especially generous) become a Friend of Pods at https://friends.pods.io/

    Cheers, Jory

    Thread Starter blindtexth

    (@blindtexth)

    Hi Jory,

    actually I am a »Friend of Pods« 🙂

    Saludos, Carsten

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @blindtexth

    Awesome! Thank you!

    Cheers, Jory

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

The topic ‘Show selected category/taxonomy’ is closed to new replies.