Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrites: Make child slug fall under parent uri similar to pages? #460

Open
christianmagill opened this issue Sep 30, 2014 · 1 comment
Open

Comments

@christianmagill
Copy link

Is it possible to make the child CPT slug fall under the parent URI similar to how page parents currently work?

I'd be happy with something like

cpt1/cpt1-item/cpt2/cpt2-item/
location/location-name/floor-plans/studio

Thanks,

@ihorvorotnov
Copy link

This is entirely possible using WordPress Rewrite API, but I believe it's outside the scope of this plugin.

First of all, do you mean CPT1 and CPT2 are separate non-hierarchical post types, where CPT2 is connected to CPT1 via Posts-to-Posts plugin? The plugin has all the query_vars you need to build your custom rewrite rules. See Wiki for the query_vars and for the Rewrite API basics check this tutorial. But I must warn you - custom rewrites is a complex concept for non-developers and first-timers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants