Archived

This topic is now archived and is closed to further replies.

  • 0

Extra Widget appearing on page

Question

Posted · Report post

Hi, I have an extra widget appearing on all sub-navigation pages when i don;t want it to. I am unsure why it is appearing as there is nothing selected in the Appearance > Widgets area that would suggest it should be there. For an example of what i mean please visit www.innov8consulting.com.au/about/about-us as an example, or any other sub-navigation page. Thanks, James.

Share this post


Link to post
Share on other sites

7 answers to this question

Posted · Report post

Are you talking about the widget that has a title of "about us" but is empty? It looks like it's duplicating the title of the page. I ran a markup validator and it looks like the subnav is missing a bracket on the closing `` tag

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Adam, Not sure, it looks like it is correct. Here is the subnav code: <div id="subnav" class="fix">

  • <?php if($post->post_parent || wp_list_pages("title_li=&child_of=".$post->ID."&echo=0")):?> <?php if(count($post->ancestors)>=2){ $reverse_ancestors = array_reverse($post->ancestors); $children = wp_list_pages("title_li=&depth=1&child_of=".$reverse_ancestors[0]."&echo=0&sort_column=menu_order"); }elseif($post->post_parent){ $children = wp_list_pages("title_li=&depth=1&child_of=".$post->post_parent."&echo=0&sort_column=menu_order"); }else{ $children = wp_list_pages("title_li=&depth=1&child_of=".$post->ID."&echo=0&sort_column=menu_order");} if ($children) { echo $children;} ?> <?php endif;?>
</div><!-- /sub nav -->

Share this post


Link to post
Share on other sites

Posted · Report post

Hmmm...cut and paste left out a couple of lines. <ul) appears of Line 2 and appears on Line 17 after <?php endif;?> and before </div><!-- /sub nav -->

Share this post


Link to post
Share on other sites

Posted · Report post

"

  • " appears of Line 2 and "
" appears on Line 17 after <?php endif;?> and before </div><!-- /sub nav -->

Share this post


Link to post
Share on other sites

Posted · Report post

ok, i don't know how to get the ul code to show up, but the brackets are definately closed.

Share this post


Link to post
Share on other sites

Posted · Report post

Do you have the plugin "custom menu links"? I think the missing tag is in there somewhere? Also, for troublshooting purposes try disabling that plugin to see what happens and make sure that you don't have any widgets with empty titles in them.

Share this post


Link to post
Share on other sites

Posted · Report post

Unreal... thanks again Adam. It was actually just a tick box setting in the plugin that i did notice.

Share this post


Link to post
Share on other sites