Support » Plugin: Pods - Custom Content Types and Fields » Archive Custom Taxonomy Page

  • Resolved aguzman525

    (@aguzman525)


    Hello,

    I am currently trying to make an archive page for my custom taxonomy. Here are the details.

    I have a custom Post Type named “Products”. Then I have a custom taxonomy name “Product Category”. Instead of a Product Archive page I would like to display an Archive Page that contains the list of Product Categories as well as display that specific taxonomy’s field (cat_image). The user can then click on that custom taxonomy and see all the related product under that taxonomy.

    Product Categories include – Fin Fish, Shell Fish, Condiments etc.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jim True

    (@jimtrue)

    Unfortunately, what you’re discussing is a custom Taxonomy Archive Template Theme page. We don’t give instructions on doing that, because that’s handled in the WordPress Theme Developer’s Handbook. We handle registering the taxonomy and allowing you to add a picture to your product category, but all of the actual design of those Taxonomy archives is all theme based stuff. Our Pods Templates and Auto Templates only do the Single Post Detail and Archives. Not the Taxonomy Archives, and what you’re discussing is a Taxonomy Archive page or a custom Product Archive that groups by Taxonomy terms.

    Are you using WooCommerce? Because all of what you’ve just described is covered out of the box with their Products/Product Categories theme templates. I personally would use what they provide and just extend with Pods if you’re doing an eCommerce site. No reason to reinvent the wheel and create all that with Pods.

    Another option if you don’t want to code but want something like that is to use FacetWP and just create a product grid and filter by taxonomy.

    I am not using WooCommerce. And I am looking to code this out. Just unsure of a way to seamlessly do this. Looks as though my taxonomy-product-category.php might not be registering, I actually am unsure what the slug would be in this case.

    Plugin Author Jim True

    (@jimtrue)

    If you don’t use your theme template, you’ll know if your product taxonomy is registered/associated properly if it works out of the box with a base WP theme. Then you can apply the correctly named file based on the WP Hierarchy. From that, yes, it’s taxonomy-<your-taxonomy>.php.

    You get the slug from the actual Custom Taxonomy you’ve created. It’s the programmatic name for the taxonomy, so if you created it as product_cat, it would be taxonomy-product-cat.php (though it _might_ be taxonomy-product_cat.php

    It works but in the wrong place I expect it too. For instance, my taxonomy-product-cat.php template shows in http://www.mysite.com/product-cat/fin-fish vs at wwww.mysite.com/product-cat. I am looking to list ALL product categories at wwww.mysite.com/product-cat. It will then display every single product category. Fin fish, shell fish, condiments

    Plugin Author Jim True

    (@jimtrue)

    Taxonomy Archives, typically, have to have a term assigned for them to display. Taxonomy doesn’t exist without the terms underneath it. No idea how WooCommerce gets around this for their Product Taxonomy Archives, but it never hurts to look at their themes to see how they are doing it.

    Your taxonomy theme is working the way it’s supposed to; you just have to find out how to make a taxonomy archive show when no terms have been chosen.

    This is definitely one of those to ask on stack overflow or stock exchange.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.