Problems creating a dynamic front page & blog (3 posts)

  1. LauraKC
    Posted 1 year ago #

    I am a WordPress newbie and struggling to create a site for my business with it. Basically I want to create site that has a dynamic homepage (with slider, widgets to latest blog posts, etc) about 5 static pages and a blog linking from it.

    I have the Spacious Pro theme. Initially I couldn't get the front page of my site to look anything like the theme demo. It just looked like a blog. So after wading through advice pages, I copied the code from the Business Template in the theme (which resembles how I would like my site) into the index.php (replacing what was already there - but saving a copy of the original code just in case I need it). Bingo - I could now use the slider, add widgets to the front page, etc.

    Then as the WordPress advice suggested, I created two pages - home and blog - and set the settings so home is the static page and blog is the posts page. I have set home as the parent page for my static child pages too. So far so good (although the URLs are a bit long).

    However when I click on the blog page it just refers to the front page. Clearly something to do with me altering the index code looking at the template hierarchy and now I am confused about what to do.

    I would really really appreciate some step by step advice on how best to build this type of site. Even if I have to start again I'd rather learn and get it right. Thanks so much for your help. Laura

  2. Jeff F.
    Posted 1 year ago #

    The index.php file is the one that controls the blog page. So what you want to do it take the code that makes your homepage the way you want it and call it something like homepage.php. And put back the original index.php file.

    Then you can create a page called home that's blank, choose the template Hompage (or whatever you name it) that is this homepage.php file and create a page called Blog that you then select as the posts page.

    That's the exact method I use all the time on sites that are child themes of twenty twelve.

    If you want to check an example http://beinspiredblog.com

  3. LauraKC
    Posted 1 year ago #

    Thanks so much for your help - really is appreciated as I'm pulling my hair out! The index.php code is now exactly as it was originally.

    I have created the home.php and created a Home page in wordpress using that home.php template. I've also created a blog page using the 'default template' (which I presume is the index.php?!?!). The home page is set as the static front page and the blog page is set as the post page.

    The front page looks right but the blog still doesn't show up. It just shows the same home page even thought the URL says ww.example.co.uk/blog. I'm not sure what else to try. The theme includes four other templates for pages which have 'blog' in the title but they don't seem to have any impact. Should the code for those be part of the index.php?

    Sorry feel like a total dunce - been doing loads of research but still no breakthrough!

    thanks again. Laura

Topic Closed

This topic has been closed to new replies.

About this Topic