I'm not sure if this is possible or not, but here is what I'm trying to achieve. I'm using WooCommerce, and I have it setup to prepend a base slug and the product category to my product permalinks. So, my product permalinks look like this:
example.com/shop/%product_category%/%product_slug%
Now, I want to create another post type called "gemstone" that uses the shop base page in its permalinks, so they would look like this:
example.com/shop/gemstone/%gemstone_slug%
The problem is that all of the gemstone pages 404. This is because their URLs are rewritten so that "gemstone" is assumed to be the %product_category% and the %gemstone_slug% is assumed to be the %product_slug%. I'm having trouble thinking of a way around this, but URL rewriting is pretty new to me. Anyone have any thoughts?
As a bonus, another problem with the product permalinks is that their attachment pages (e.g. example.com/shop/%product_category%/%product_slug%/%attachment%) all 404 as well. For reference, I have opened a bug ticket for the attachment page issue on the WooCommerce github.