• Hi, i have done a bit of searching and haven’t found anything that helps me yet. I want to display the latest posts on a page named ‘Blog’ but im not sure how to do this i have seen some people say you can just change it under the settings->reading bit in the back-end but this does not work for my page, i am guessing the blog.php file has to have some kind of coding in it for this to work? I cant find anything to help, so any help would be great.

Viewing 3 replies - 16 through 18 (of 18 total)
  • You might be able to just make a copy of blog.php and name it index.php.

    See the Codex here for info on creating a static front page. As explained there, the blog page CANNOT use a custom template or any content.

    Thread Starter lukewilde

    (@lukewilde)

    Well i changed the blog.php to index.php and it seems to have worked, just one thing that isn’t going right is that the <?php the_title(); ?> bit of code is getting the title of the newest post and not the page name of ‘Blog’ unless that is not the code which should get getting the page title? as i am sure that is what i used for my other pages and it has worked for the others.

    the_title() displays the title of the current (or first) post.

    As I said before, the blog page does not use a template or content, so it does not have a displayable page name. Your index.php should include a call to get_header() where the setup for all pages is done.

    I still think you will be better off in the long run by choosing a theme and modifying it to look the way you want. You are missing too many pieces of the puzzle to make this work well.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Blog page’ is closed to new replies.