Nav-Menu not showing up

To see the menu, you need to set it up in the wordpress admin side. Go to Appearance -> Menus You should see a “Manage Locations” tab. Select it. You should see your “Main Menu” location. Choose the menu that you created there. Select Save Changes. Since you used “theme-location” to set up drawing it, … Read more

If current menu item is child or parent with child?

I agree with ialocin, if you can use the built-in nav menu css classes you should but if those aren’t enough there’s a nice little filter which can help with css classes. If you need something other than CSS classes you can use a Custom Walker ( as ialocin suggested ) and use the same … Read more

Creating other page than page.php

WordPress allows you to create custom page templates. Create your own template and assign that template to any page you like in the WordPress admin 😉

Multiple categories for one menu item?

I believe, most obvious choice would be to create two categories “Fall-Winter” and “Spring-Summer” and put four other categories in both of them. Your URLs would be like this /category/fall-winter /category/fall-winter/formal-wear /category/fall-winter/night-wear Now, to list the formal wear for both fall-winter and spring-summer on page, we have few following options Create formal wear etc as … Read more

Modifying the walker to insert parent’s description above sub menus

If i understand your question correctly, the first thing you would need to do is, go to your menus /wp-admin/nav-menus.php (screen options) and checkbox (tick) on the description. and this is how your walker class should look like class Menu_With_Description extends Walker_Nav_Menu { function start_el(&$output, $item, $depth, $args) { global $wp_query; $indent = ( $depth … Read more

Current User In Custom Menu Item URL [closed]

Congrats on figuring it out. Perhaps this would also work: function change_menu($items){ foreach($items as $item){ if ($item-> post_name == ‘the-slug’)/*replace “the-slug” with menu item post_name */ $item->url = bp_loggedin_user_domain() . ‘/events/my-events/?action=edit’; } return $items; } add_filter(‘wp_nav_menu_objects’, ‘change_menu’);

Why is my container argument not working for wp_nav_menu() [closed]

As I am using the roots theme framework, this line removes the container argument: function roots_nav_menu_args($args=””) { $roots_nav_menu_args = array(); $roots_nav_menu_args[‘container’] = false; if (!$args[‘items_wrap’]) { $roots_nav_menu_args[‘items_wrap’] = ‘<ul class=”%2$s”>%3$s</ul>’; } if (!$args[‘depth’]) { $roots_nav_menu_args[‘depth’] = 2; } return array_merge($args, $roots_nav_menu_args); } add_filter(‘wp_nav_menu_args’, ‘roots_nav_menu_args’);