WordPress.org

Ready to get started?Download WordPress

Forums

Adding a blog to a website (6 posts)

  1. mellyg
    Member
    Posted 11 months ago #

    So I am wanting to turn on of my pages into a blog page.

    I have had a look around at others with this problem and it seems like I need to do this in the reading settings.

    My home page is built on index.php, which doesn't come up as an option for homepage in the reading settings and when I select the 'blog page' for the post page - I just get the home page (index page)

    Anyone know what I need to do?

    Mel

  2. alchymyth
    The Sweeper & Moderator
    Posted 11 months ago #

    build your home page on a template named front-page.php
    and recode index.php to be the blog template

    http://codex.wordpress.org/Template_Hierarchy

    as a lesser alternative, consider to create a page template to be used a 'blog page'
    http://codex.wordpress.org/Page_Templates
    http://codex.wordpress.org/Class_Reference/WP_Query

  3. mellyg
    Member
    Posted 11 months ago #

    Heya, thanks for getting back so fast.

    So I have moved the front page to home-page.php - all worked fine.

    But how do I make the 'blog' page have the posts? I have tried doing this in the reading list but no luck, its still connecting to the home page.

  4. alchymyth
    The Sweeper & Moderator
    Posted 11 months ago #

    the 'blog' page will use index.php when set as posts page under 'reading' - you will need to edit your index.php template;

    what is the full code of index.php right now?

    (please use the pastebin - http://codex.wordpress.org/Forum_Welcome#Posting_Code )

  5. mellyg
    Member
    Posted 11 months ago #

    Heya Index page code is below, the code is the same as the other pages and I have added in the loop. (not sure if that is what I am supposed to do)

    Thanks a million for your help

    http://pastebin.com/zVJDVY9D

  6. mellyg
    Member
    Posted 11 months ago #

    Heya, found this article
    http://digwp.com/2013/01/display-blog-posts-on-page-with-navigation/ so all fixed now.

    Thanks for your help

Reply

You must log in to post.

About this Topic