Drop-Down confusion
-
I’m working with someone else’s child-theme of Simple Organization theme. I’m trying to enable custom menus with submenus. I followed the directions at codex and commented out the old menus in the Header.php and footer.php files.
<!--adding Header Menu--> <?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ?> <!--commenting old menu <?php sm_mainnav(); ?>-->
There is a call to a submenu function
<?php sm_subnav(); ?>
as well as the function in the function.php file
function sm_subnav() { global $post, $wpdb; if ( is_page() ) { $child_of = null; if ( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type='page' && post_parent = ".$id) > 0 ){ $child_of = $id; } else if ( $post->post_parent != 0 ) { $child_of = $post->post_parent; } if ( !is_null($child_of) ) { echo '<div class="navigation" id="sub-nav">' . "\n"; echo '<ul class="tabbed">' . "\n"; $title = get_the_title($child_of); echo '<li class="page_item page-item-'.$child_of.'"><a href="'.get_permalink($child_of).'" title="'.$title.'">'.$title.'</a>'; wp_list_pages('title_li=&exclude=120&child_of='.$child_of); echo '' . "\n"; echo '<div class="clearer">?</div>' . "\n"; echo '</div>' . "\n"; } } }
I did the GUI menu interface with the submenu items tabbed to the right, saved the custom menus etc. But my result is all the menu items one after another. Besides registering the menu, placing the php in the desired spots and setting up the GUI is there something else I need to do?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Drop-Down confusion’ is closed to new replies.