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.

Currently, permalinks are set to /%postname%/.

I'd like to prefix "blog" before all standard posts.

I'm using several custom post types, each with their own rewrite rules in the setup.

How can I setup a custom prefix for my standard WordPress posts?

share|improve this question
1  
This is not that easy, I would suggest just adding a category called blog. –  Wyck May 19 '11 at 5:27
add comment

1 Answer

up vote 2 down vote accepted

did you try defining your perm structure like: /blog/%postname%/

If each one of your custom post types has its own slug defined, this should work like you are asking.

share|improve this answer
4  
It is possible that this will also add this prefix to the rewrite rules of your other custom post types. If it does, you should explicitly set the with_front parameter of the rewrite argument you use when registering the post type to false. Use my Rewrite analyzer plugin to see the new structure of all your rewrite rules to prevent surprises. –  Jan Fabry May 19 '11 at 17:08
    
I'll give that a try. –  Jonathan Wold May 19 '11 at 20:31
    
@Jan - Thank you for those additional details, I'll keep that in mind and take a look at the plugin accordingly - thank you! –  Jonathan Wold May 19 '11 at 20:32
    
Thanks for the answer, Daniel. –  Jonathan Wold May 26 '11 at 15:34
    
Sweet, Jan, with_front was exactly what I needed. –  bfred.it Dec 9 '12 at 1:30
show 1 more 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.