0
votes

I'm creating a WP site for a fitness studio with a bunch of locations. I've set up a custom post type 'studio' for each studio page where we'll enter some custom field content (hours, gallery, etc). That will have urls like site.com/studio/dallas

Each studio also needs schedule and pricing subpages (dallas/scheduke, dallas/pricing). ALL of this content is pulled from an external API so I'm trying to avoid generating all of these extra pages for no reason.

What I'd like to do is have those 2 subpages set up automatically when a parent studio is created. I'll have a custom field on the main studio page to enter a studio ID #, which will tell the subpages what pricing and schedule data to load.

The goal is to make this as simple as possible, avoiding adding 3 pages (1 main, 2 sub) for each studio since there could eventually be hundreds of locations. Bonus points to have those urls work (/dallas/pricing, etc) without actually having a subpage created at all, so it's only a page for each location in the Studio page list and the subpages are just dynamic, maybe using some redirect rules for the subs.

As a visual, sitemap might be..

Chicago
-- Pricing
-- Schedule
Dallas
-- Pricing
-- Schedule
New York
-- Pricing
-- Schedule

But I'd love the actual admin page list to just be Chicago, Dallas, New York...

Thanks in advance everyone!

1

1 Answers

0
votes

if anyone stumbles on this, found a solution that works perfectly at https://www.placementedge.com/blog/create-post-sub-pages/