-1

I'm developing my site with MAMP and my homepage is at localhost:8888/wordpress

When I click on the link to my blog page (home.php) the url looks like this: localhost:8888/wordpress/blog

All good so far.

However, when I click on a blog post from the home.php template the url looks like this:

localhost:8888/wordpress/blogpostname

How can I make it so it's localhost:8888/wordpress/blog/blogpostname ?

When I changed my permalink settings to localhost:8888/wordpress/%category%/%postname%/ it still left out the /blog in the URL.

Why is it doing that and how can I fix it?

1
  • You should try changing the post permalink to - /blog/%category%/%postname%/
    – Shazzad
    Commented Feb 26, 2014 at 16:33

1 Answer 1

1

add /blog/ in your permalink settings:

/blog/%category%/%postname%/

or

/blog/%postname%/
2
  • That works but it adds the blog prefix to custom post types as well.
    – chap
    Commented Feb 26, 2014 at 16:00
  • that's what the 'with_front' parameter is for when you register your custom post type, set that to false.
    – Milo
    Commented Feb 26, 2014 at 16:04

Your Answer

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

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