0

I am using custom taxonomies with WordPress 3.0.4

Does anyone how to remove the taxonomy base from the URL?

I have seen plugins that do it for categories and tags, but not for custom taxonomies.

For example, I have a custom taxonomy called 'cities'. I would like my URL structure to be mydomain.com/newyork instead of mydomain.com/cities/newyork

Is there a function or something I can use?

2 Answers 2

3

@iamfriendly and @Carson - setting the with_front argument to false (or true for that matter) will not allow you to remove 'cities' from the URL.

Sign up to request clarification or add additional context in comments.

Comments

0

http://codex.wordpress.org/Function_Reference/register_taxonomy

If you look there, you'll see a 'rewrite' argument which you can see to true. This argument also takes an argument of 'with_front' which defaults to true... which is why you have the 'front' of the taxonomy.

When creating your custom taxonomy, set those arguments as you wish, and you'll be away :)

If it is you who has set up this custom taxonomy, then you're able to actually set the with_front argument to false which will stop this happening. If you look here:

http://codex.wordpress.org/Function_Reference/register_taxonomy

You'll see the 'rewrite' argument and just below that, you'll see the 'with_front' part.

1 Comment

I am also looking for an answer to this. Unfortunately, with_front => false does not remove the taxonomy base. If I use slug => false I get the desired result, BUT it breaks all other permalinks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.