0

I would like to overwrite my URL on single blog posts. At the moment my posts are displaying as www.mydomain.co.uk/post-title, however I would like them to be as www.mydomain.co.uk/blog/post-title so /blog/ always displays before post item, I've tried to do that from permalink level but when I put /blog in Post name box it works, however all my single Custom posts are displaying as /blog/custom-post-item which is not what I'm after as I would only like that to happen for blog posts and not for custom post types.

Any tips.

Many thanks

0

If you are not using Custom Post Types the following in your permalink settings should work just fine.

/blog/%postname%/

Screenshot

(Below can still be applicable depending on your use of custom post types)

Keep your regular permalinks on blog like you have it in settings. And in your custom post type arguments the "with_front" Boolean field will help you achieve what you are looking for.

...
'rewrite' => array(
    'with_front' => false,
    'slug' => 'your-slug'
),
...

More info about rewrites here http://codex.wordpress.org/Function_Reference/register_post_type

4
  • Thank you very much for your answer, sorry I wasn't clear enough those are not custom posts but core WP posts types so there is no custom posts type argument in my function.php
    – jmysona
    Feb 18 '13 at 18:05
  • Can you clarify "however all my single Custom posts are displaying as /blog/custom-post-item which is not what I'm after". What are you referring to as a single custom post. post_type = post? or something else?
    – Cole
    Feb 18 '13 at 18:17
  • Yes that is correct post_type=post
    – jmysona
    Feb 18 '13 at 18:26
  • Then my edit above should work properly.
    – Cole
    Feb 18 '13 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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