WordPress.org

Ready to get started?Download WordPress

Forums

Placing posts in /blog/ with pages in the root domain (8 posts)

  1. marketappeal
    Member
    Posted 4 years ago #

    Hi

    I can't believe I'm the first person to want to do this...

    I've installed WordPress in the root of my new domain and set up the posts to show in the blog folder by adding the path /blog/%postname%/ to the permalinks settings, which worked fine.

    Ideally, I'd like to add a link to /blog/ to the main navigation alongside the top level pages and I'd end up with a proper website structure based upon WordPress.

    The problem is that /blog/ currently gives a 404 error message and you have to type in a full post url /blog/postname/ to make it work.

    Can anybody suggest a solution please?

    Thanks

    Anthony

  2. ryans149
    Member
    Posted 4 years ago #

    your can set up a redirection for /blog to your main domain.. I hope it will work

  3. marketappeal
    Member
    Posted 4 years ago #

    That will simply bring back up the page that's set to my homepage won't it? Ideally, I'd like / to bring up my services homepage and /blog/ to bring up my most recent post.

    Any advice?

  4. koola
    Member
    Posted 4 years ago #

    The reason it is coming up as an error is the /blog/ is a sub directory or folder so you need to create a different path.log in to your control panel and change it in the ftp account.

  5. marketappeal
    Member
    Posted 4 years ago #

    Thank you. I'll give that a go.

  6. marketappeal
    Member
    Posted 4 years ago #

    It appears that the full answer to my question lies here: http://codex.wordpress.org/Making_Your_Blog_Appear_in_a_Non-Root_Folder

  7. S.K
    Member
    Posted 4 years ago #

    I think this procedure is to be deprecated as obsolete. The same facility can be easily achieved by selecting a static page and blog page under reading options without the rigmarole of creating a separate template. Only precaution is that a folder called "blog" should not exist in the WordPress directory.

    And the issue brought about by marketappeal too will not occur.

    My two bits!

    S.K

  8. Russell Heimlich
    Member
    Posted 4 years ago #

    Kichu is right. This is pretty easy to do from the Reading panel it's just very non-obvious. Here's what I did...

    1) Created a page that I want to be my front page.
    a) Title = Home
    b) Body Content = whatever you want to appear on the fornt page.

    2) Created a blog page
    a) Title = Blog
    b) Body Content = blank, you can put anything you want here it doesn't show up anywhere.
    Basically this page determines what URL slug to use.

    3) In Settings -> Reading -> Front page displays
    a) Select the 2nd radio button (as of v2.8) which says A static page (select below)
    b) Front page = Home
    c) Posts page = Blog

    Now example.com/ will show a static page and example.com/blog will show your blog index page (10 recent posts for example). Works great!

Topic Closed

This topic has been closed to new replies.

About this Topic