• Resolved jazfotodesign

    (@jazfotodesign)


    Re-doing a site, link: https://www.spiritgrowth.com/wordpress/

    Been looking around how I can either enable the support of menus for my navbar or just enable drop down lists (parent>child pages) whichever is easier…

    I’m using this code to call my wordpress pages…

    <?php wp_list_pages('title_li=&depth=1'); ?>

    Any help appreciated

Viewing 12 replies - 1 through 12 (of 12 total)
  • Does your theme support custom menus

    Thread Starter jazfotodesign

    (@jazfotodesign)

    nope.. “The current theme does not natively support menus”

    Hi,
    <?php wp_list_pages(‘title_li=&depth=2’); ?> will show childrens

    Thread Starter jazfotodesign

    (@jazfotodesign)

    Yeah that shows them, but does not create drop down list

    Ah Ok!
    you can fix it with css.
    //the ul of the children won t appear
    #menu ul ul {

    display: none;}

    //when li of parent hover ten the ul of chilfren appear
    #menu ul li:hover > ul {
    display: block;
    color: #9F3;}

    in your case:

    li ul{display:none}
    li:hover ul{display:block
    }

    i ve just tried and it works but there is a mistake as you should wrap the wp-list-pages in a ul like that:
    <?php wp_list_pages('title_li=&depth=2'); ?> and if you put a div even better and the next code will work:`//the ul of the children won t appear
    #menu ul ul {

    display: none;}

    //when li of parent hover ten the ul of chilfren appear
    #menu ul li:hover > ul {
    display: block;
    }
    `
    Try it

    <ul><?php wp_list_pages(title_li=&depth=2′));?>`

    to wrap you main menu in a ul
    ciao

    for your sidebar this code works perfectly:

    ul#menu-menu ul{display:none}
    ul#menu-menu li:hover>ul{display:block}

    Thread Starter jazfotodesign

    (@jazfotodesign)

    I’m trying to put the nav in the theme’s category header section… This is all the CSS for categories.

    #categories-back a {
    		color:#6e6960;
    		display:block !important; display:inline-block;
    		height:55px;
    	}
    
    .category a {
    		margin:0 0 6px 0; padding:5px 10px;
    		background:url(images/category.gif) no-repeat top left;
    		font:bold 0.85em Arial, Helvetica, sans-serif;
    		color:#FFF; text-transform:uppercase;
    		display:inline-block;
    	}
    #categories-back a:hover {
    		margin:0; padding:0;
    		color:#443842; text-decoration:none;
    
    	}
    .category a:hover {
    		background:url(images/category.gif) no-repeat 		bottom center;
    		text-decoration:none;
    	}
    #categories {
    		margin:0; padding:0;
    		width:auto; height:101px;
    		background:url(images/categories.gif) repeat-x;
    	}
    
    #categories-back {
    		margin:0;
    		width:auto;
    		height:81px;
    		background:url(images/categories-back.gif) no-repeat center left;
    		list-style:none;
    		padding-top: 20px;
    		padding-right: 0;
    		padding-bottom: 0;
    		padding-left: 40px;
    	}
    
    #categories-back li, #categories-back li.blank {
    		margin:0 0 0 20px; padding:0 20px 0 0;
    		float:left;
    		background:url(images/category-divider.gif) no-repeat top right;
    	}
    
    #categories-back li.blank {
    		margin:0 0 0 20px; padding:0 20px 0 0;
    		float:left;
    		background:none;
    	}

    and here is the code calling categories

    <div id="categories">
    
    		<ul id="categories-back">
    		<?php wp_list_pages('title_li=&depth=2'); ?>
    		</ul>
    
    </div><!--categories-->

    #categories ul ul {display:none;}
    
    #categories ul li:hover ul {display:block;padding:0;}
    Thread Starter jazfotodesign

    (@jazfotodesign)

    Thank you David, works like a charm. Now I got to get rid of those stupid arrows. Really appreciate you taking out the time to help me.

    No problem, you re welcome
    bye

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Menu help: Drop down links – parent/child pages – custom menu’ is closed to new replies.