Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

What are the options for creating URLs like:

site.com/category-name/post-name

Where, "category-name" is the first category that the post was assigned to (in the event that the post is assigned to multiple categories)

Note: if the post is assigned to "uncategorized", I don't want to display the category name in the URL, so in that case, I just want

site.com/post-name

PS: it will also require the removal of the word "category" from the URL. I was able to get that done with the plugin "no category base", however, it does not include the parent category name in the URL to a post.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

By default, the category with lowest ID is used.

If you want control over what the category is, you can try the Hikari Category Permalink plugin, which allows you to choose which post category is used for the permalink.

http://wordpress.org/extend/plugins/hikari-category-permalink/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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