Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Taxonomy & Post Type Permalinks WordPress


I'm working on a website that will have a catalog of guitar effects pedals.

I have made a custom post type called "Pedals". A hierarchal taxonomy called "Manufacturers" and a non-hierarchal taxonomy called "Types".

I would like the permalink structure to look like this - lists all pedals from the "Pedals" post type[manufacturer] - lists all pedals in the specified manufacturer taxonomy (category)[manufacturer]/[pedal] - displays the single.php for a particular pedal. [manufacturer] is obviously the manufacturer taxonomy (category) it belongs to.[type] - lists all pedals with the specified type taxonomy (tag)[manufacturer]/[type] - lists all pedals by the manufacturer of that type

I don't want[pedal],[pedal],[manufacturer], or so forth to be valid URLs. Everything should have /pedals in front of it, and then it should nest accordingly.

Thanks in advance.

Answers (4)


Svilen Popov answers:

Try the [[LINK href=""]]Custom Permalinks[[/LINK]]

Dan Davies comments:

Wouldn't that involve manually setting a permalink for each pedal? And continuing to do that forever?


Ryan Riatno answers:

Have you assign the "Manufacturers" and "Types" taxonomy on custom post type "pedals" ?

Dan Davies comments:

I've done this, if this is what you mean:

register_taxonomy("db_manufacturers", array("db_pedals")
register_taxonomy("db_types", array("db_pedals")


Romel Apuya answers:

try reading this.. about [[LINK href=""]]custom permalink.[[/LINK]]


Gabriel Reguly answers:

Hi Dan,

How are you dealing with these permalinks?

Have you tried to use a template redirect?

add_action( 'template_redirect', 'custom_template_redirect' );
function custom_template_redirect() {
global $post;
if ( $post->post_type == 'pedals' ) {
// here you add your code to get the correct page

If you provide the code for your custom post type and the taxonomies I could help more.


Dan Davies comments:

Hey Gabriel.

The code for my post type and taxonomies is here:

All the best.