1

The reason i ask is because when i create pages they don't insert the usual name of the post type like CPT's do.

For example if i create a page called toyota the URL would be http://domain.com/toyota, but if i created a custom post type to Enter all the makes one page with custom links to specific pages within my site and say that CPT was called Cars then the URL would look like this http://domain.com/cars/toyota and therefore wouldn't properly link to the page.

Is there any way to work around this?

3
0

I believe the answer to be yes and no and probably a few versions of each but here's what i've learned.

You can link to external sites of course and pages through any WYSIWYG editor that you add as a custom field within a CPT, you can even do the same by adding an external link within a common text field so that's my yes vote.

No, because it's not really the best way to use CPT's because, and this is solely from my not so long experience in theme development with WP, when you create a CPT it's so that you can add custom input fields, images, color pickers, etc and group them in a relevant way so that you can create several posts that will display that exact content but will each have their own unique version of that content.

So if you're going to create a CPT called Neighborhoods that all needed images, written content, custom content areas, etc you would create that once and then "Add new neighborhood" to give that neighborhood a unique title, unique images and content, etc. and eventually call on that specific page in some way throughout your site and even link to it from another part of your site, or add it to a custom query if you have given it a taxonomy. So linking manually is certainly not the best place to be in from a maintenance standpoint you'd want pages to link to it's relevant content dynamically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.