• The submenu does not show on the following WordPress-blog:
    http://blog.narrowminds.nl/

    The page ‘feedback programmas’ contains a subpage which the menu does not show and I cannot find the solution in the css style sheet. The page in the submenu does show when I choose to show the pages in the sidebar. Can you the error? It should be very simple.

    This is the code in style.css of the menu:

    /*- Main Menu in Header */

    ul.menu {
    margin: 0;
    padding: 0;
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 90%;
    }

    ul.menu li {
    display: inline;
    margin: 0;
    }

    ul.menu,
    ul.menu li a {
    padding: 5px 10px 6px;
    }

    ul.menu li a {
    font: 1.2em Verdana, Helvetica, Arial, Sans-Serif;
    color: #666666;
    margin: 0;
    }

    ul.menu li a:hover {
    background: #00A1B8;
    color: #FFFFFF !important;
    text-decoration: none;
    }

    ul.menu li.current_page_item a,
    ul.menu li.current_page_item a:hover {
    color: #FFFFFF !important;
    background: #00A1B8;
    text-decoration: none;
    }

    .admintab {
    position: absolute;
    right: 0px;
    /*_padding: 5px 15px 6px;*/ /* IE hack */
    }

    * html .admintab { padding: 5px 15px 6px } /* IE hack */

Viewing 5 replies - 1 through 5 (of 5 total)
  • This is a common request and there is some information on the Codex (which I can’t put my finger on at the moment. – try searching for drop-down menu)

    At first glance, your theme doesn’t appear to have support for drop-down menus. But here is a plugin you may want to look at incorporating into your theme
    http://www.weeatbricks.com/2008/01/07/new-wordpress-plugin-for-creating-a-drop-down-navigation-menu-using-jquery/

    try placeing this code in your header or whereever your menu is called from.
    you should have somethin like this right now?

    <ul class="menu">
          <?php wp_list_pages('depth=1&sort_column=menu_order&title_li='); ?>
    </ul>

    try making it this:

    <div class="menu">
    	<ul>
    		<?php wp_list_pages('depth=1&sort_column=menu_order&title_li='); ?>
    	</ul><br />
    <?php
    	if($post->post_parent)
    		$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else
    		$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
    	if ($children) { ?>
    
    	<ul>
    		<?php echo $children; ?>
    		<?php } ?>
    	</ul>
    </div>

    That should put child page navigation right below your parent navigation when and if there are child pages. It should also show them if you are on a child page too.

    Thread Starter cevandermeij

    (@cevandermeij)

    By replacing the code you mentioned it changes the horizontal menu into a vertical menu,see http://blog.narrowminds.nl/ to view what I mean.

    I have already tried drop down menu plugins but I could not find a plugin that is really easy editable (css) to make the lay-out the way I want it.

    what about a css menu like on the following sites which all use the same code (different colors though):
    http://www.playforwarddesigns.com/home
    http://www.realestateofnorthidaho.com/home
    http://www.themortgagesalesblog.com/home

    Hey guys!

    I thought this was possible to achive as well with categories. I’m using WP as a CMS, and is looking for a way to “divide” the mainmenu from the submenu.

    My code looks like this;

    <div class="menu">
    	<ul>
    		<?php wp_list_categories('depth=1&sort_column=menu_order&title_li='); ?>
    	</ul>
    		<?php
    	if($category->cat_parent)
    		$children = wp_list_categories("title_li=&child_of=".$category->cat_parent."&echo=0"); else
    		$children = wp_list_categories("title_li=&child_of=".$category->ID."&echo=0");
    	if ($children) { ?>
    
    	<ul>
    		<?php echo $children; ?>
    		<?php } ?>
    	</ul>
    </div>

    The first ul lists the category parent, the other ul is supposed to only list the children of the active category. But it gives me both the parent AND children. Any ideas how I achieve this?

    Any feedback is appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘submenu does not show in navigation bar’ is closed to new replies.