WordPress.org

Support

Support » Themes and Templates » [Resolved] Static Front Page problem

[Resolved] Static Front Page problem

  • I created a Static Front Page per the directions of a Codex article Creating A Static Front Page. However, I am seeing 2 “Host” navigation buttons on the menu bar as stated in the Troubleshooting Themes section. The instructions state the following:

    Navigation Bars
    Some themes have top navigation bar containing links to Pages. By default most themes set “Home” as a link to the home page – in this case the static front page. Since you have created a separate page with the title “Home”, there is a likelihood of another link text appearing as “Home”.

    To change it, edit the appropriate template file featuring the code of the navigation bar with the template tag wp_list_pages. Set the parameters to change the link title.

    Set the parameters to what?

    Below is the navigation code from Header.php which I believe is the correct place to fix the problem. However, what am I supposed to change to resolve this problem?

    <!-- Main nav Starts here -->
            <div id="navouter">
                <div id="nav">
    
                    <ul id="dropmenu">
                    <li class="page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>"><a href="<?php bloginfo('url'); ?>">Home</a></li>
                    <?php /* Navigation */
                    	wp_list_pages('title_li=&depth=0&sort_column=menu_order&child_of=0');
                    ?>
                    </ul>
    
                </div>
            </div>
            <!-- Main nav Ends -->
Viewing 2 replies - 1 through 2 (of 2 total)
  • Change it to this:

    <!-- Main nav Starts here -->
    <div id="navouter">
    <div id="nav">
    <ul id="dropmenu">
    <?php /* Navigation */
    wp_list_pages('title_li=&depth=0&sort_column=menu_order&child_of=0');
    ?>
    </ul>
    </div>
    </div>
    <!-- Main nav Ends -->

    We have removed one line which no longer applies.

    Perfect – Thanks! I actually commented out the code with a comment for future reference since it applies to other templates as well.

    <ul id=”dropmenu”>
    <!– Using a Static Home Page requires removing the following line of code –>
    <!– <li class=”page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>”>“>Home –>
    <?php /* Navigation */
    wp_list_pages(‘title_li=&depth=0&sort_column=menu_order&child_of=0’);
    ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Static Front Page problem’ is closed to new replies.
Skip to toolbar