Editing wp_list_pages
-
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
-
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>I, too, am utterly confused as to how to resolve this so am bumping up the thread. Thanks for any help you can offer.
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]
The topic ‘Editing wp_list_pages’ is closed to new replies.