One archive layout for all categories?

Hi there!

I tried looking through the forum for an answer, but was unclear of the answer.

My posts have categories - wondering if I can create one Category Archive page to pull posts based on the current term name? Or do I need to create a separate layout for each category archive?

For example:
Categories are things like: Aviation, Automotive, Industrial, etc… so if I visit any of those category pages it only shows posts belonging to said category. Do I have to create different archive layouts for each category and assign it conditionally to each category?

Hi @turnkeydigital,

Thanks for reaching out! You can create a single Archive layout and assign it to All Archives in the layout assignment condition

image

This archive layout will be used for all of your categories.

Cheers!

Hmm, I’ve tried that.

I then used a grid element where the cell is the Consumer. Within the cell is the Featured Image of the post {{dc:post:featured_image_id}} and a headline for {{dc:post:title}}. Nothing is populating. I do have an archive layout set for all Posts of this type (projects), and it pulls all posts as it should. However, this layout for each category is different from the main archive layout, which is why I need this second archive layout. The scenario is this:

A user views ALL posts (“projects” => mydomain.com/projects/) and on the archive page of all posts, a user can click the different categories listed to view the posts belonging to the category they clicked on (this brings them to the category page, not a filtering option => mydomain.com/category/automotive/)

Do I need a looper provider here since I already have a separate archive page assigned for all posts?

Hello @turnkeydigital,

It seems that you want multiple layouts for the post type archive page, one that would list all the posts of the custom post type and another one would be for the custom post type category. Please make sure you have assigned the layout properly like this.

Untitled-Archive-Layout-Archive-Layout-Cornerstone

Untitled-Archive-Layout-Archive-Layout-Cornerstone (1)

Please note that you don’t need a looper provider on the archive layout since the default loop is working if it is not populating the data we need to check the settings. I would request please share the admin login details meanwhile I would suggest you troubleshoot a few of the common issues before we investigate your settings. Please share your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin-level username and password
  • Exact layout URLs

You can find the Secure Note button at the bottom of your posts

Thanks

Thanks!

I tried that too. I supplied login credentials in a secure note.

Hey @turnkeydigital,

The given credentials is not working, please double check and update them with the correct ones.

Thank you.

Hello @turnkeydigital,

The given credentials have not been updated. We still cannot access the staging site. In the meantime, please check out this video tutorial instead:

Best Regards.

Sorry, the username is incorrect. See secure note for updated credentials.

Following up on this I have not heard back.

Sorry Marc, the username was incorrect. Please see secure note for updated username. Password remains the same.

Hi @turnkeydigital,

I have checked the Category Archive layout and found it is working fine while assigning it to All Archives. Can you please check and let us know if you are still having the same issue?

Thanks

No, it’s not. All that has done is changed the layout for ALL Project Archive. When viewing a category Archive, there are no projects listed. The Archive for ALL projects is not supposed to look like this, which is why I have two separate layouts created, one for ALL project archives, and one for CATEGORY archive.

Hi @turnkeydigital

I have checked both layouts and found that the priority of the ** Category Archive** layout was set to -1. That is why it was overriding the Project Archive layout. I have reset the priority to 2 for Category Archive layout and now it is working. Also, the Grid is not set with the Looper Provider and that is why the Projects were not showing.

Thanks

I just checked and you only had the looper provider set to query if the category was Automotive. This is still not correct. What are you saying the Looper Provider should be??

Something is of here - setting the Category Archive conditional as “Project Taxonomy is Category” brings the page to “Global Block Cannot Be Found”

I’m just going to guess it might be best to set up separate layouts for each Category. This just isn’t pulling the data like it’s supposed to by using one layout for all Categories.

Is there something wrong with how Categories are set up? My assigned header for Category Archive is not working either. It is assigned correctly when I view ALL Projects, but reverts back to the Main Header. I’m wondering if because “Category” is not a registered Taxonomy, but came included with the registration of the Custom Post Type if it’s causing issues being dynamically read back in?

Following up to add: I removed "Categories " as a the default taxonomy for the CPT, Projects. I then registered a different taxonomy, “Markets”, and set up the layout with proper conditionals, and all is working as it should. I am not sure what was going on with Categories, but the data was not pulling.

You can mark this as closed.

Hey @turnkeydigital,

It is good to know that you have resolved the issue already. Thanks for letting us know.

Cheers.