• I’m creating a theme from scratch (and am new to this). Developing locally, using MAMP.

    The home page of my site will be a WP static page, showing, amongst other things, the latest entry on the blog. We’ll call it HOME.

    The main page of the blog itself (where it shows the x many recent posts and comments and such) is on another page. We’ll call it BLOG.

    I’ve written the templates for two pages, in my text editor, in HTML/CSS/PHP.

    Where I’m confused: How do I get the right template to show up for the right thing? Do I name the pages “home.php” (for HOME) and “index.php” (for BLOG) and rely on the template hierarchy? Do I use the Admin interface to add the pages? What do I call them? Do I use the Settings > Reading panel to tell WP what my home page and blog pages should be (but it doesn’t list them unless I add them in the Pages panel… and I know I shouldn’t be adding my blog page as a page, when it’s not really a page…

    Anyway, I know this is a simple task. I have the two templates ready to go. If someone could give me the step by step of how to get one to show up as my static home page and the other as my blog main page, I’d be much obliged. My brain’s in knots.

Viewing 1 replies (of 1 total)
  • I think this is what you want.

    1. Upload the two template files as frontpage.php and blog.php.
    2. Create a new page for the home page with the title ‘Home’. Assign the template as ‘frontpage’ instead of the default.
    3. Create a new page for the blog page with the title ‘Blog’. Assign the template as ‘blog’ instead of the default.
    4. In Admin->Settings->Reading, choose ‘Front page displays: A ststic page.’
    5. Select the ‘Home’ page in the dropdown for ‘Front page:’
    6. Select the ‘Blog’ page in the dropdown for ‘Posts page:’

    That should do it.

Viewing 1 replies (of 1 total)
  • The topic ‘Confused about adding pages (to theme from scratch)’ is closed to new replies.