Forums

How to Have a Starting Page and a Blog Page for The Loop? (4 posts)

  1. chaseman
    Member
    Posted 1 year ago #

    I'm creating a WordPress theme and I'm wondering how I could implement two pages as default into the theme, one would be the starting page and the other would be the blog page for The Loop.

    I know how to do this manually (in the WordPress settings) by adding a page and making one of the pages as the default page. But if I'm looking to sell this theme I'd rather not have the user do it manually, I'd rather have it be a default part of the theme itself, which means it should be pre set up that so that there's a default starting page and one blog page for The Loop.

    Any ideas how I can accomplish this?

  2. haxxxton
    Member
    Posted 1 year ago #

    by default, index.php will always be the landing page...

    so this will default to being the homepage, whether it has blog posts on it or not is up to you..

    then you just create a template page called Blog Page.. that the user can select from the page template drop down box when they create pages..

    have a look at how to create template pages here:

    http://codex.wordpress.org/Pages#Page_Templates

  3. chaseman
    Member
    Posted 1 year ago #

    Thanks a lot man, page templates is what I was looking for.

  4. chaseman
    Member
    Posted 1 year ago #

    Hey man,

    I tried your suggestion, I added a custom page and named it (blog.php), I also added the code snippet to the top of the file, and then I tried what the documentation is stating but I can not find that menu entry which gets mentioned in the documentation (Write -> Page administration panel).

    It must have gotten changed in the newer version, do you know how I could do it now?

Topic Closed

This topic has been closed to new replies.

About this Topic