I am new to PHP, trying to find a way to list pages for my menu and in it Index.php
What I'm using here:
& lt; Div id = "navigation" & gt; & Lt; Ul & gt; & Lt ;? Php wp_list_pages ('sort_column = menu_order and sort_order = desc & title_li = & amp; depth = 2 & amp;')? & Gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt ;! - End ID: Navigation - & gt; The site can be viewed at:
just something Like this:
& lt; Div id = "navigation" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = '& lt ;? Php bloginfo ('url')? & Gt; ' Gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt ;? Php wp_list_pages ('sort_column = menu_order and sort_order = desc & title_li = & amp; depth = 2 & amp;')? & Gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt ;! - End ID: Navigation - & gt; As you can see, I have a new & lt; Li & gt; The element that was liked for the home page can be retrieved using this information function.
Edit I've read Richard's answers and I think this is a better approach. I really did not know about the show_home option, just the way I wrote it, I just need to customize the anchor of that home page URL.
Comments
Post a Comment