Grow your CSS skills. Land your dream job.

Custom WP Page

  • # October 17, 2011 at 3:39 pm

    I created a custom home page for my Child WP Theme and included the tag shown here at the top of my custome page.

    < ?php
    /*
    Template Name: home-page
    */
    >?

    My top navigation consists of Home | About | Blog | and so on..

    In the Reading Settings under the Dashboard I have the following settings:
    Front page displays:
    Front page: Home
    Posts page: Blog

    Everythin is working ok. When I click the home tab or nav, the custome home page displays, but the only problem I am runing into is when I click on the Blog page menu, the home page is displayed again. Is there any PHP coding that i need to use to get ahround this?

    # October 17, 2011 at 3:47 pm

    You have an error in the code that you posted. It should be:

    < ?php
    /*
    Template Name: home-page
    */
    ?>

    What template is your blog page supposed to be using? What are the templates you have in your theme’s folder?

    # October 17, 2011 at 4:07 pm

    Thanks for your prompt reply. That error was a typo. The one in my custom template page is
    < ?php
    /*
    Template Name: home-page

    */

    ?>

    # October 17, 2011 at 4:21 pm

    “What template is your blog page supposed to be using? What are the templates you have in your theme’s folder?”

    # October 17, 2011 at 7:08 pm

    I am only using one template named home-page. This is the only template in my themes folder. The other files are style.css, funchtions.php and header.php which I am using in my child theme folder.

    # October 18, 2011 at 2:16 am

    I may be a little confused by the semantics here…but Try renaming the home page to frontpage.php and creating a new template for the blog. This may help http://codex.wordpress.org/Template_Hierarchy

    # October 18, 2011 at 1:04 pm

    Thanks dtrick. I just renamed my home page template to frontpage.php and everything worked.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".