Custom Post Type is called “Work”
Taxonomy is called “Listings”
Series of categories
Do I need to create a “Work archive template” with the query loop and use the “work archive template” as a main menu item? (this method does output the correct link structure) Then again, I thought we are not supposed to add content to a template? So, not sure if this is the right way.
Also, when going this route I am not able to change the background color of the “work archive template” because I have replaced the post content block with the query block… In addition I am not able to apply a conditional header for this specific archive page.
As you can see, it’s a mess… Any help is very much appreciated!
@Alexander Aye you need to Create an Archive Page Template for your Custom Post Type. For Custom Post Types you can’t create a Traditional Wordpress ‘Page’ or ‘Post’ for your Archive Page. In ACF under Custom Post Types make certain to enable the Archive Page. Then you can go into Cwicly Themer and create a Template for the that specific Custom Post Type Archive Page.
For example, I have a custom post type of ‘Christmas’ I create a Single Item Template and place content in it like the Header & Footer that will be identical on all Christmas Posts. In between the Header and Footer I have the ‘Content’ block that pulls in the content from the actual custom posts.
The URL for the Archive page will be www.mywebsite.ie/christmas/
For any Christmas custom posts will be for example www.mywebsite.ie/christmas/private-party-nights/
I created an Archive Template for my custom post type ‘Christmas’. Because it’s an archive template I have to put all content in that Template for the frontend Christmas Archive Page.
Each Custom Post Type can have a Archive Template (in the Cwicly Themer). So for example I have 3 custom post types, Christmas, Weddings and Events. I will have a Archive Template for each one of those custom post types in the Cwicly Themer.
Add your Query block into each Archive Template and configure it for whatever suits, You can select Post Type and select you Custom Post Type or you could sort by Category within the custom post type or by Taxonomy. Up to you, its all possible as Cwicly is incredibly versatile.
Whatever you put in the Archive Template, be it the header and footer, that will only display on that specific Custom Post Type Archive page on the frontend. So each Custom Post Type will need a Archive Template and Single Page Template.
To add an Archive Template to your menu find it in Appearance > Menu like so:
Ok, great additional infos and explanations - thanks again!
Regarding background colors, you suggest to add an extra div for the archive template. Is this sort of best practice - talking DOM size etc.? My global color is white, however - my archive template needs to have a different background color. Thanks.