Creating an Archive page for Custom Post Types and categories and or taxonomies

Hi

I’ve built myself a quick testing site to work out how to integrate CPT UI plug in with the new Layout feature in Pro.
http://henryb6.sg-host.com

So the set up is as follows:

Step1
Custom Post Type created using CPT UI plug-in, called ‘Testimonials’
Step 2
Categories for this post type have been created using a custom taxonomy and 3 categories added for testing
Step 3
Layout created for single page created and working fine.
Step 4
Layout for Archive page created but can’t seem to get this part working. I can’t find the right combination of queries to get it all working.

Archive page settings as follows:

A row has been used as a looper provider with the following settings:

And a column set to looper consumer

The aim is for an archive page to show posts from a category that is clicked on.

Many thanks
Henry

Hello @henrybag,

Thanks for writing in!

Please remove the Looper provider in your CPT Archive layout because an archive runs a loop already. Having a Looper provider will only mess up the Pagination of the archive page.

The aim is for an archive page to show posts from a category that is clicked on.
You are on the right track. If you visit the Testimonials archive, you can click on the testimonial item.

Hope this helps.

Hi
Thanks for getting back to me, I’ve removed the looper provider but still can’t seem to get it working.

https://henryb6.sg-host.com/testimonials/
When the user clicks on a category I was hoping that they would be taken to the archive page for that category and displaying post assigned to that category.

https://henryb6.sg-host.com/testimonial_category/category-1/
But when you click the category nothing is displaying - so I assume I’ve got something wrong on the Archive Layout settings.

Hello @henrybag,

You seem to have two Testimonial Categories:

Please fix or at least have different names so that when you use the names in the condition, you will be adding the right condition.

Kindly let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.