• Hey all,

    I’m creating a website that is primarily page based but will include some blog entries. Currently I have my permalinks writing just to %postname%

    However, I’d like the posts to include a /blog/ rewrite without my users having to specify any category.

    Things could get klunky very quick when I have permalinks like
    domain.com/about and then also domain.com/some-really-long-blog-title

    In short, how can I make pages still write to domain.com/about and POSTS write to domain.com/blog/some-really-long-blog-title?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Create a new page named Blog

    Go to Settings / Reading and set your posts page to the new Blog page. That accomplishes what you are after.

    A post named My New Post will have a URL of
    domain.com/blog/my-new-post

    Thread Starter aestock

    (@aestock)

    I did as you said, but this didn’t seem to work. I’m running 3.1. My homepage is a static “Home” page, posts page is “Blog” (also a page). My posts are publishing to the Blog page as you would expect, but permalinks are still writing without the /blog/ prefix.

    If you mean your single post pages are showing up as
    domain.com/my-new-post

    change your permalink to
    /blog/%postname%

    which will make
    domain.com/blog/my-new-post

    Thread Starter aestock

    (@aestock)

    Durr. For some reason, I thought this would add it to pages as well. Should’ve checked. Thought I did.

    Thanks much.

    Glad it worked.

    When permalinks are enabled pages have a built in permalink of /%postname.
    Or, if they are a child of a parent page,
    /grandparent-page-name/parent-page-name/%postname

    Great, looks like this forum feed is still fresh. I have a similar problem…

    I’ve been helping someone with a wordpress that is also comprised of mostly pages. But, he has a page called “home” which is the wordpress default page for posts.

    I have his permalinks set to /%pagetitle% which seemed to work fine for custom permalinks for his new pages.

    However, he would also like custom permalinks for posts. When he creates a new post for the blog on “home” the titles are links. And, when clicked he’s directed to a page that doesn’t exist. Probably because my permalink structure.

    So, how do I make it so that he still gets his full blog (with custom permalinks), and still get custom permalinks on pages?

    Thanks SOOOOO much guys. I’m pretty new, but ready to rock and roll. 🙂

    There is no permalink variable named /%pagetitle%

    The reason your pages work even with an invalid variable is because when permalinks are active, pages all use /%postname% as their permalink.

    When applied to posts, the permalink you created points to a non-existent URL.

    Read this page to learn more about permalinks:
    http://codex.ww.wp.xz.cn/Using_Permalinks

    Aha! Make perfect sense. Well, I followed closely the directions you gave to “aestock” and it seemed to have worked perfectly. I created a new page for the blog, changes the settings as outlined and updated the custom permalink tag.

    Thank you so much for your help.

    I’ll be updating my evernote research now with your comments. I had no clue I had an invalid variable, lol. I guess it just sounded good to me and it was working, lol.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Permalink Rewrite for Posts vs Pages’ is closed to new replies.