Support » Plugin: Pods - Custom Content Types and Fields » Looping pod taxonomies in a pod template

  • Resolved koua

    (@koua)


    Hello,

    I integrated a loop on a taxonomy type pod. I put this loop in a template pod like this:

    [each categories_de_solutions]
    <li><a href="{@permalink,esc_url}">{@name}</a></li>
    [/each]	

    As a result, the loop does count the number of records linked to the taxonomy but the values ​​of and of are not displayed.

    I think I used the wrong syntax?

    Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter koua

    (@koua)

    {@categories_de_solutions} this code returns each item separated by a comma. I would like to extract each of the items in order to display them in list mode :

    Anti-Spam, Antivirus & Security Software, OS Subscriptions, Software, et Software Technical Support

    Like this !

    Anti-Spam
    Antivirus & Security Software
    OS Subscriptions
    Software
    Software Technical Support
    Merci :.)

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @koua

    The code you’ve posted looks good to me.
    Are you sure the template is used in the right context? Eg. is the current object known at where you use this template?

    Cheers, Jory

    Thread Starter koua

    (@koua)

    Hi Jory :.)

    I use the ‘categories_de_solutions’ taxonomy pod from a pod template. I can clearly see in the right menu the reference to the taxonomy pod ‘categories_de_solutions’ with the following elements attached to it:

    term_id
    name
    slug
    description
    taxonomy
    parent
    term_taxonomy_id
    term_group
    count

    Thanks
    Stéphane

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @koua

    The fact that you’ve selected a Pod reference on the template page doesn’t mean anything for the context you are actually in on your page.
    Where do you output this code in your website?

    Cheers, Jory

    Thread Starter koua

    (@koua)

    I have a post type pod named ‘partners’ on which I have activated the automatic template with the model named “Template partners single post 2”.

    The “partners” pod is linked to the taxonomy pod named “categories_de_solutions”

    In this template, I have the following code :

    [each categories_de_solutions]

    Plugin Author Jory Hogeveen

    (@keraweb)

    Ah right, you linked to the taxonomy through the regular WP taxonomies I suppose. I don’t think that is currently supported yet.

    I’ll look into this!

    Plugin Author Jory Hogeveen

    (@keraweb)

    Tested this locally but both the extended taxonomies and custom taxonomies work perfectly.
    Are you sure you have the name of your taxonomy correct?
    I see that you’ve used a plural name, shouldn’t it be singular? categories_de_solution

    Cheers, Jory

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Looping pod taxonomies in a pod template’ is closed to new replies.