By default the core WP Categories taxonomy is designed for the post-type post. If you view an archive created by the core WP Categories taxonomy it will show posts.
Even if you add another post types to the core WP Categories taxonomy those archives will still only show the core post type.
You have to override how the archives query works to include other post types into the core category archive pages. This can be done with custom code.
Because of this showing categories by default on a custom post type is not enabled since it requires custom code to enable a custom post type in a category archive it also requires custom code to show the archive name and link in the custom post type.
Yes, thank you for explaining what I already know. ALL of this has been done already. (Since registering a CPT, even via plugin, doesn’t include this).
The code to include my CPT within the archives for ‘tag’, ‘category’ and my custom taxonomy ‘country’ has already been added to the functions.php file within my child theme for Kadence. Therefore, anything that pulls from the archives should include the CPT as well.
[Which works perfectly fine on a different site that I later plan to convert to Kadence… if Kadence lets me do what I need it to do].
On the front end – it works beautifully: my cpt posts show in the tag archives.
But that’s also not what the issue is… The issue is that Customizer does not show any editing options for the default WP Categories that have been attached to my CPT, nor does it show the custom taxonomy attached to the default WP posts.
I don’t know Customizer, otherwise I’d be looking at that part of the code and guides to just add what’s needed. You already have a menu to edit CPT, which includes a section for the Title Elements – they just aren’t showing all of the options possible (specifically, the WP categories). Is that section using an array where it just needs added into the array? Is that section coded any differently than the Title Elements section for editing posts (where it does show WP Categories in the Title Elements)? Adding a custom taxonomy might be trickier to add, but it really shouldn’t be that hard to include WP Categories on CPT when the sections already exist.
Woven into your reply *might* be a possible “temporary” solution: creating a CPT page template as an element with the Pro Post Grid Block (since that block seems to allow the CPT & custom taxonomy – although I didn’t find this info in the block’s information & guides…) and hooking it to show instead of my archive pages.
But unless I’m missing something, the only way to add the WP categories in the Title Elements on a single CPT page, (or my custom taxonomy on the WP single post) would be create an entire title block element including the Title, Meta, Categories, etc and hook it using kadence_single_before_entry_content
. And that’s if it all works correctly.
Except then I’m using Kadence Pro to fix something that should work already within the Kadence theme…
CPT might not get used often by many, but it’s not something “new”. Adding CPT in WP has been possible since 2005, and really took off around 2012 – nearly a decade ago! If Kadence theme was a standalone, “plug & play” type theme – then it’d be fine without such options. But Kadence is marketed as a core theme that can be built upon, designed, and even set to replace page builders. (The key reason why I bought the entire Membership). But this lack of support for CPT and custom taxonomies is not only frustrating, it’s disappointing.
-
This reply was modified 3 years, 4 months ago by dilbert16588.