WordPress.org

Ready to get started?Download WordPress

Forums

Editing wp_list_pages (4 posts)

  1. jkisha
    Member
    Posted 4 years ago #

    I am using a theme called "Tropicala" and i am trying to create a static home page. I followed the instructions at this link http://codex.wordpress.org/Creating_a_Static_Front_Page and I was able to make the page and have it display as the home page.

    However, there is a duplicate "Home" page link that is now being displayed in the menu.The trouble-shooting section of the above help states:

    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.

    But I don't know much about php and don't know exactly how to modify that portion of the code. The existing section of the code is currently:

    `

      <li <?php if(is_front_page()) { ?>class="current_page_item"<?php } ?>>/">Home
      <?php wp_list_pages('sort_column=menu_order&title_li=' ); ?>
    `

    Any help is greatly appreciated; thanks in advance.

    JK

  2. jkisha
    Member
    Posted 4 years ago #

    All the code didn't appear correctly above; so I'm trying again. If it looks the same, then it's not correct and I don't know how to make it show properly. :(

    <ul>
            <li <?php if(is_front_page()) { ?>class="current_page_item"<?php } ?>><a href="<?php echo get_option('home'); ?>/">Home</a></li>
            <?php wp_list_pages('sort_column=menu_order&title_li=' ); ?>
          </ul>
  3. Kricket
    Member
    Posted 4 years ago #

    I, too, am utterly confused as to how to resolve this so am bumping up the thread. Thanks for any help you can offer.

  4. Kim09
    Member
    Posted 4 years ago #

    Hey jkisha and Kricket.
    Try to remove this code:
    <a href="<?php echo get_option('home'); ?>/">Home</a>

    [link moderated - if you have videos and tutorials that are helpful please submit them to http://wordpress.tv/ and use those links]

Topic Closed

This topic has been closed to new replies.

About this Topic