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.

I'd like to setup:

www.mydomain.com/a-page/
www.mydomain.com/blog/category_name/
www.mydomain.com/blog/category_name/post_name/
www.mydomain.com/custom_post/post_name/

How would I do it? Thanks in advance

share|improve this question

2 Answers 2

In your WordPress dashboard, go to Settings / Permalinks. Click custom structure, and leave /%post-name%/. You can also edit the tag / category base in this section.

share|improve this answer
    
So far it is: /blog/%category%/%postname%/ –  Jenski Mar 19 '13 at 14:44
    
that should be exactly what you're looking for. I usually delete the /%category%/ part ...but it looks like you want to keep it there for posts? –  OhHendrie Mar 19 '13 at 14:51
    
if you want to remove /blog/ for your pages - you'll need to move your WordPress installation to the root directory. Right now, it seems like you've got WordPress installed at www.yoursite.com/blog/ ...in which case you won't be able to remove the '/blog' section from your URLs. Make sense? –  OhHendrie Mar 19 '13 at 14:55
    
once you've done that, you can add '/blog' before the /%post-name%/ part in your permalink settings. –  OhHendrie Mar 19 '13 at 14:56

In Options » Permalinks just add a base for post permastruct. Ex: /blog/%postname%/.

Make sure that your custom post types are registered with 'with_front' => false in rewrite argument. See: http://codex.wordpress.org/Function_Reference/register_post_type

share|improve this answer
1  
"This answer was automatically flagged as low-quality because of its length and content", which I am sure you don't want. Please add more detail to the answer to avoid this issue-- for example, links to relevant Codex Pages. –  s_ha_dum Mar 19 '13 at 15:03
    
lol. The answer contains all the details needed to solve the problem. –  Dan Ștefancu Mar 19 '13 at 17:41
    
Short answers get flagged, whether they deserve it or not. It is an automated system, after all. I've seen toscho's get flagged and I'm sure some of mine have been flagged. Just add a bit more description and a link or two and it won't happen. It is also good to keep in mind that "the details needed to solve the problem" is relative to the person reading the answer. Not everyone understands as much as you. If they did they wouldn't be asking. –  s_ha_dum Mar 19 '13 at 21:18

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.