Ecommerce Shopify WordPress Discussion

Multiple custom post types with single taxonomy URL rewrite

I've created 2 custom post types (let's call them "cpt-1" and "cpt-2"). These two CPTs share the same custom taxonomy (called "category"). I've done this with the ACF plugin. Here's the default URL structure: Single post (cpt 1): Single post (cpt 2): Taxonomy archive: Here's what I need: Single post (cpt 1): Single post (cpt 2): This should also work if a single post is associated with a sub-category, for example, Taxonomy archive (showing cpt 1 posts only): Taxonomy archive (showing cpt 2 posts only) : This should also work for sub-categories, for example Is it possible to do this? I've already consulted dozens of topics and articles. The simplest and most concise solution seems to be this: Wordpress URL Rewrite to sync custom taxonomy and post type I also find a code that manage hierachical taxonomy (category and subcategories) : From what I understand, a custom rewrite rule must be used to restructure URLs, and a post_type_link filter to display new URLs, but I don't have a good enough level of coding to adapt it to my case. Here are the features I'm having trouble finding: Taxonomy hierarchy management in the URL ( Use the same taxonomy archive for 2 different custom posts ( AND Besides, I don't even know if it's possible to separate the taxonomy archive according to the CPT. If it's too complex, I'm tempted not to use taxonomy, and to create a page hierarchy for each CPT to have the URL structure I want easily (for example, inside a custom post type, create a "category-name" single post as parent page, and a "post-name" child single post). What do you think about it? Thanks in advance :)
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.