I need to find a way of making one custom post type a child of another and for the permalink structure to reflect that.
I'm getting in a complete twist over this and really hope someone can help. I think I possibly might have got my thinking back to front.
My site consists of a main 'umbrella' company site (with pages, news / blog etc - using worpdress' default posts and pages), which then also lets a user visit sets of specific branch / or sub company pages accessible from the main nav.
(Throughout I refer to Custom post type as CPT and custom taxonomy as TAX).
I've created CPTs and Taxonomies as below:
CPT = Branch
CPT = Case studies
CPT = Products
CPT = Recent news
TAX = Location
When someone visits a Branch page they see an overview of the Branch (setup with various custom fields within the CPT)
>> URL structure: site-url/branch/london-branch
The user can click on a Case studies link to see Case studies (CPT) for that branch
>> URL structure: site-url/branch/london-branch/case-studies
Same goes for Products and Recent news CPTS:
>> URL structure: site-url/branch/london-branch/products
>> URL structure: site-url/branch/london-branch/recent-news
However, the recent-news page would probably show the last 10 recent news items, which I then want a user to be able to click through to read the single news post:
>> URL structure: site-url/branch/london-branch/recent-news/single-news-post
Does that make sense?
I've created a simple Sitemap/tree diagram to hopefully illustrate things a little better.
I've used the Location taxonomy as a way to link all the different CPTs together by branch location.
I've tried all sorts of options within my templates but can't find anyway of achieving what I need.
I've tried the post2posts plugin, which is great and allows me to link between CPTs, but I don't get the permalink structure I'm after, so that currently isn't working for me.
My next thought was to use a multisite install using a master site for the main company umbrella site, with a mini-site used for each branch. Would this be a better of doing this as I think it would solve my url/permalink issues.
I think this is achievable, but is there anyway to share a custom post type (i.e CPT: Products) between each of the different sites in a multisite install as each Branch would have the same products available.?
Many many many thanks if you're able to help - I'm really stuck!