• I know this has been asked before but I’ve tried the work arounds suggested but nothing seems to work (unless I missed a tutorial).

    I have a site, example.com.

    I have portfolio pages, regular “pages”, and I have a blog.

    Portfolio URLs work fine and are in the format example.com/portfolio/article-name

    Page URLs work fine and are in example.com/page-title.

    But I want my blog to be in this format:
    example.com/blog/article-title

    I have a static blank page named “blog” and I have gone to Settings->Reading and made the home page a specific home page and Posts set as the blog page.

    My Permalinks are set to:
    /%postname%/

    I have tried putting /blog/%postname%/ but that just makes all posts AND pages contain the /blog slug.

    How in the heck do I get just my blog articles to have /blog in them?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • lisa

    (@contentiskey)

    please post link to your website

    Just to be clear, are your Portfolio URLs a Page, a Custom Post Type, or a regular Blog Post?

    Your setup of Custom Structure > “/blog/%postname%/” should work, unless your Portfolio links are technically Posts as well. Categories, tags, archives (IE. months, years), and post authors will receive the “/blog/” in front of them if you edit the permalinks. Pages should not.

    Check here for a very similar question to yours:
    https://stackoverflow.com/questions/15617820/wordpress-custom-permalink-for-just-posts

    Thread Starter John H

    (@wpbloghost)

    Thank you to both.

    Okay I think it’s a custom post type because when I use the custom permalink structure like you suggest, it works fine. But when I click on “portfolio” items the URL is exmaple.com/blog/portfolio/article when it use to be just example.com/portfolio/article

    On the homepage if you go here you’ll skip to the “portfolio” area:
    https://phoenixsupplycompany.com#work

    Click on any of the images and you’ll see /blog in the URL when you go to that page.

    Note that I’m working on changing the “portfolio” word to something else, so that word might change to “products”.

    Thanks again.

    Since your Portfolio items are a Custom Post Type, you need to edit how the Custom Post Type is registered in your theme files and set with_front to false.

    The topic I linked before has the same issue as yours, and it has the code/answer needed to resolve it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can't get blog articles into a /blog URL’ is closed to new replies.