Support » Plugin: Pods - Custom Content Types and Fields » Display all categories in Taxonomy

  • Resolved rscarter1


    I would like to list all the topics in a taxonomy.

    This code:

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

    Only shows the taxonomy that post is related to. How can I show all?

    • This topic was modified 8 months, 1 week ago by rscarter1.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jory Hogeveen


    You will have to use the Pods shortcode. The taxonomy needs to be a Pod in order to work.
    Cheers, Jory

    It is in a pod called topic. Still don’t understand.

    [pods name="topic"]

    doesn’t work

    • This reply was modified 8 months, 1 week ago by rscarter1.

    It’s frustrating, isn’t it. You get the feeling that there is power here and that you should be able to do what you need to with this tool..

    ..If only there was some decent, simple, documentation!

    I get that dealing with complex custom types with interrelations won’t be simple but I don’t expect to run before I can walk. Just some simple starter stuff, like listing out a taxonomy, or a template based on the standard articles, would surely help.

    I’ll let you know if I crack it, rscarter.

    I hear you. If they made simple example pages for each and every possibility (reaching here – there are likely billions – but just the basics!) these guys would be zillionaires.

    Plugin Author Jory Hogeveen


    @rscarter1 @douglasuk

    decent, simple, documentation

    If they made simple example pages for each and every possibility

    Did you read the documentation page I’ve linked to?
    We’ve provided a doc page for the shortcode with examples included. It’s possibilities are to many to include all examples. There is a difference between wanting to read a documentation page and just wanting the answer to your specific situation.
    Off course we are constantly working on improving our documentation (this is a LOT of work).

    these guys would be zillionaires.

    Pods is a free plugin. We do not have any intends on creating premium plugins.

    I don’t expect to run before I can walk.

    With Pods you are running 😉 If you want to be able to create relationships between objects and automatically create templates without the need of coding you are bound to spend time learning a system because you’d normally need a developer for this.

    In short, we do our best to improve our documentation constantly but since there are so many possibilities It’s difficult to add every example and keep a workable overview.

    Ok, back to topic.
    [pods name="topic"] won’t work since you didn’t provide any parameters on what it should display (you should see a notice for this stating “Please provide either a template or field name”).
    This can be either a field from the topic taxonomy or a Pods template. You can also make this a nested shortcode like so: [pods name="topic"]CONTENT[/pods]
    Please see the documentation page for examples.

    EDIT: The field parameter currently doesn’t support multiple items (since it doesn’t know what to delimit the items with it has no purpose). A template or nested shortcode would be your best option.
    When you are already within a Pods template you should use the template parameter and not the nested shortcode as it’s content will be parsed before the shortcode is run.

    Cheers! Jory

    you’d normally need a developer for this.

    I am a developer. But I’m fairly new to WordPress and very new to Pods.

    Maybe the problem is that I am a developer: whereas WordPress is generally simple end-user kind of stuff, Pods is not that, nor is it a language I can get to grips with. To be honest, I’m still not even sure what Pods is.

    I came across a short blog article on another site that told me I needed to install the Classic Editor (until then, I thought ‘Code Editor’ was the old editing system) and that has helped, if only because the Pods Wizard was then available, which got me some results (not quite what I wanted, but at least something to build with).

    Yes, I read the page – and all those linked – that you pointed to thanks. I wonder when you last tried reading that page as though you knew nothing about Pods.

    Just one example:
    there’s an example in the contents “Show a Pods Page”. Well, that’s one thing I want to do, so I click on it. “You can display one or more items in a Pod, using Pods pages, via a shortcode.” Well, great, I’d like a list of items from a Pod on a page, so .. oh, there’s just two code lines. OK, they illustrate how to get a specific pod and the first five pods. But what page will they appear on? Uh, it seems I have to give it a page. But a page is what I want it to give me. So what’s this page parameter expecting? OK, under ‘Available Parameter Options’ I see it’s something I pass to find() so let’s look at that. “Specify a page of the results to get. Defaults to $this->page”. Whatever that means (I don’t know what $this is but it’s probably either the blog uri or a global array variable) but either way, there’s a default, so try without. Nope, ‘Please provide either a template or field name’ so give it some name: [pods name=”country” page=”mypage” limit=”5″]. Nope, ‘Please provide either a template or field name’. But it can’t want a template, or the code would have said so (as it does in the example just above), and it’s not a field name it wants, so what is this page it wants? But hang on, although the example code gives page=”page_name” the parameter documentation says its an int! So try a number there, like 0 or 1. Nope, both of those return “Please provide either a template or field name”. Give up at that avenue, try a general search for help on Google, which might be more intelligible/correct/explanatory.

    Now, if you think I’ve done anything really daft in tracking that through, having read the previous pages (those that have any content at all) and discounting those which are clearly talking about editing in PHP (sure, if I need to, but I just want a country-region hierarchical taxonomy: SURELY someone has wanted such a simple thing before!), then by all means tell me where I pratted. We all make mistakes and if I’m making one I’d like to know. I really would. All I have wanted for almost two days now is to add a simple hierarchical taxonomy (done that, easy, thank you), transfer Category data into it (done that, thanks to kristarella’s Taxonomy Converter), and now pretty much use and display my new Country taxonomy wherever Categories are used and displayed. This has to be one of the simplest, most obvious uses for Pods and I can’t work out why it is so hard, or nobody has written down (accurately) how to do it.

    Plugin Author Jim True


    I’m not going read most of the above discussion, but what you’re running into is a question of CONTEXT.

    When you use [each][/each] blocks, those are intended to only be relevant to the post in the loop that is passing through the Pods Template.

    If you want to target something OUTSIDE the loop, you need to take the context outside the loop by using a shortcode and using the name of the pod.

    [pods name="topic" limit="-1"]<li><a href="{@permalink,esc_url}">{@name}</a></li>[/pods]

    If you’re calling that shortcode INSIDE a Pods Template, you need to take the custom template (the stuff inbetween [pods]...stuff!...[/pods]) and make that a Pods Template and call it using template=”name of template”

    Every magic tag in the Pods Template is processed BEFORE shortcodes, etc. are run against them.

    I hope that helps clear some of this up for you guys.

    Plugin Author Jory Hogeveen


    Thanks @jimtrue
    I’d like to add a sidenote to that and the above.

    I am a developer. But I’m fairly new to WordPress and very new to Pods.

    In that case I’d advice you to go the PHP route since that is what you are comfortable with.
    Pods templates etc. is meant for non-coders to create custom templates without the need to create a custom theme or custom theme templates. However, this off course has it’s limitations.
    For developers I would advice not to use the Pods templates and go the PHP route which is way more flexible and allows you to create your own theme templates 100% the way you want with the help of WordPress core functionality.

    To help you get started. Pods uses the WordPress core metadata to store fields ed.
    See WordPress functions like get_post_meta() to fetch fields.

    Pods is not that, nor is it a language I can get to grips with.

    Pods simply extends WordPress with UI features to create CPT, Tax, fields and templates. The templates supports the use of WordPress shortcodes and Pods Magic Tags to fetch dynamic information related to the current post.
    The shortcode syntax is simply that of WordPress, nothing to do with a language.
    The magic tags is custom to Pods and are basically variables you can place in your templates without the use of PHP. A bit similar to Twig maybe.
    Other than that is Pods fully PHP and you can use Pods in your plugins in themes using PHP.


    As for the documentation/discussion.
    I think what you are mostly bumping against is the whole WordPress system itself and the way posts/pages and their templates work. Also, getting familiar with hooks is very advisable.
    You can use Pods to manage your custom post types, taxonomies and their fields.

    Anyway, this is getting way to off-topic for this issue. If you would like to continue, please open a new issue.

    Hope this helps!
    Cheers, Jory

    Thank you, Jim and Jory.

    I appreciate the time you’ve taken here.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Display all categories in Taxonomy’ is closed to new replies.