Customize url for custom post type?

Hi,

I have two custom post types (created with custom post type UI plugin), they are called “brand” and “model”.

On every “brand” single-page (for example BMW) I list all BMW models which are posts from “model”, I connect brands and models with categories.

If I am at the BMW brand single-page my url is “…/brand/BMW” … and then when I enter a model single-page from the model-list it gets an url like “…/model/modelname” … I would like to get an url like this:

“…/brand/brandname/modelname” … is this possible and if so how would I do it? Notice I am using the custom post types plugin and have really sparse PHP knowledge.

Pretty sure it’s like this.
your top page is “brand”, your second page is 'brand mode’l. When you create ‘brand model’ you’ll see on the right hand side in the “page attributes” slot the option to give the page a parent. select the page “brand”.
Now it is a child of “brand”
your third page is ‘model’. Same thing. go to the right hand side in the “page attributes” slot the option to give the page a parent. select the page “brand model”

I believe that should work.
D

Hmm yeah but these are posttypes rather than pages… like:

…/posttype/singlepagebrand/singlepagemodel

well not sure then.
I tested adding a category to the post. the adding the category to the menu w/the page as a sublevel. Didn’t quite work the way you wanted to.
Adding a taxonomy and creating a new category, for exaple “brand” might be the way to do it.

I just used this page to add a team member list. This might help you.
but i’d have to wonder why not just create a page rather than a post in your case?

D

1 Like

maybe this could help you as well

http://stanhub.com/create-wordpress-single-template-for-a-specific-category-or-custom-post-type/

1 Like

Hi, sorry for the late reply. Seems like a hustle to get this done using two custom post-types so I will probably try some other approach, like with taxonomies or something=)

Well, good luck w/that. Am a bit new to ACF & taxonomies but they seem to add quite a lot more options and worth learning.
D

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.