Enabling Dropdown menu in my template
-
Hello there,
I am using my own logic to create a menu which have “|” after a menu name. Here is the code i use to get the output.
<?php $menu ="Main Menu"; $items = wp_get_nav_menu_items($menu); $ticker_k = count($items); for ( $m=0;$m<=$ticker_k-1;$m++ ) { if (($ticker_k - $m) === 1) {?> <li> <a target="<?php echo $items[$m]->target; ?>" href="<?php echo $items[$m]->url ; ?>" class="menu_li"><?php echo $items[$m]->title; ?></a> </li> <?php }else {?> <li> <a target="<?php echo $items[$m]->target; ?>" href="<?php echo $items[$m]->url ; ?>" class="menu_li"><?php echo $items[$m]->title; ?></a> <span>|</span> </li> <?php } } ?>
Don’t upset. The result will be like this ??
Home | About | Contact US
But i want to add Dropdown support too for this menu. Any one have any idea about this.?
Note : Ok. If you don’t understand my code bla bla bla.. then just tell me an easy way to enable dropdown menu support in my template.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Enabling Dropdown menu in my template’ is closed to new replies.