Just after some advice on the best way to set up a new section of my site.
What I want to do is to enable users to add their "cars" (so will be a post type) then have a series of other post types underneath (as child posts I guess). Things like a maintenance log, parts list etc. My query is how i'd be best to set it up so that users can have multiple cars, and view the various maintenance tasks/parts etc attached to that car?
For a new project like this I would recommend you check out the betas (available from your wp-types.com/account/downloads page by switching to the beta channel) which feature completely revised functionality and UI for adding post relationships.
They are a work-in-progress but nearing completion (there will be further updates next week and the stable versions are expected early next month).
You can connect different post types, e.g. cars to logs and parts, and then when viewing one post, e.g. a car, display content from the connected posts.
Thanks for getting back to me- that's really helpful. Still a couple of questions though (assume you guys are still working on the documentation). I've managed to make some good progress.
Ideally, I want to break everything out into sub-sections.
At the moment, I have a view set up that lists all a users cars, and a form that allows them to add new ones.
When viewing a car, I want users to be able to click a link that will take them to a sub-page with just that post type on it - say a page exists at /car-name/maintenance/ that has a view containing all of the maintenance tasks that relate to that particular car, as well as a form to add new maintenance tasks.
I want to do this because the lists under the various post types (maintenance log, parts list etc) are going to get really long, and I don't want a huge scrolling page- it just wouldn't work.
Are you able to point me in the right direction to achieve that? Should be smooth sailing once I've got this last little piece sorted. Cheers!
Sorry for the delay getting back to you, it was a long weekend here in Ireland.
You can create a page to display maintenance posts—all maintenance posts—that includes a filter to limit what maintenance posts are shown to only those that belong to a particular car.
Which car you pass as a URL attribute.
So on the page that displays the car, you add a link to the maintenance page and append the ID of the car with a URL parameter using the wpv-post-id shortcode, e.g.
<a href="[wpv-bloginfo show='url']/maintenance/?carid=[wpv-post-id]">Maintenence list for this car</a>
The name of the URL parameter doesn't matter as long as you use the same in the link and in the filter in your View.