Main Nav Fix
-
I have found that the main nav desplays incorrectly on some browsers when you add subpages.
This fix makes sure that the “span” tags are properly placed and that sub pages dont find their way into the mix.
In the “functions.php” file (wp-content -> themes -> lightword)
Replace the
wp_list_pages_new()
function with this:function wp_list_pages_new(){ global $lw_show_categories; if ($lw_show_categories == "true") { $top_list = wp_list_categories('echo=0&title_li='); $top_list = str_replace(array('">','</a>','<span><a','current-cat"><a'),array('"><span>','</span></a>','<a','"><a class="s"'), $top_list); return $top_list; }else{ $top_list = wp_list_pages('depth=1&title_li=&link_before=<span>&link_after=</span>'); $top_list = str_replace(array('">','</a>','<span><a','current_page_item"><a'),array('"><span>','</span></a>','<a','"><a class="s"'), $top_list); return $top_list; } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Main Nav Fix’ is closed to new replies.