Adding class atribute to wp_nav_menu ul
menu_class is indeed what changes the ul class. What’s happening there is you didn’t set which menu to use: wp-admin/nav-menus.php?action=locations
menu_class is indeed what changes the ul class. What’s happening there is you didn’t set which menu to use: wp-admin/nav-menus.php?action=locations
From a SEO perspective this would qualify as double content and you could get penalized by search engines for it unless you specify the right canonical URL or something, but the best practice would be to redirect one of the URL’s to the other. Whichever you consider the most important. To assist you with your … Read more
wp_nav_menu() reutrns HTTPS?
Hardcoding links to wp_nav_menu
You could either extend the Walker_Nav_Menu walker class (i.e., the start_el function is sufficient, as already mentioned). Or you could hook in when the original output (i.e., the category) has been created. That would be the walker_nav_menu_start_el hook. For instance like so: function wpdev_139801_start_el( $item_output, $item ) { if ( isset( $item->object ) && $item->object … Read more
Under “Settings” -> “Reading” in the wp-admin you (or other users) can set which page should be used as the home page.
Menus not showing in the admin menu, after save
wp_dropdown_nav function to list menu items
To create the menu in the first place, feel free to use the shortcode [AVIA_tree_menu root=”your_root_document_title”] by adding this to functions.php: function sc_AVIA_tree_menu($atts) { extract(shortcode_atts(array(‘root’ => ‘Start’,), $atts)); //default if empty. $page = get_page_by_title($root); $args = array( ‘child_of’ => $page->ID, ‘date_format’ => get_option(‘date_format’), ‘depth’ => 0, ‘echo’ => 0, ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’, … Read more
As pointed out from @Howdy_McGee it should be possible to use the current-menu-anchestor css class. However, using the standard menu walker in a CPT archive page taxonomically nested under a menu item I wasn’t able to get the class out as expected. The solution I adopted was to add a create a filter to inject … Read more