Remove nav_menus from customizer using a theme

This is panel not section so remove_section() will not work in this case. However you can use function remove_panel() but it will trigger a notice saying Notice: WP_Customize_Manager::remove_panel was called incorrectly Removing nav_menus manually will cause PHP warnings. Use the customize_loaded_components filter instead. Please see Debugging in WordPress for more information. (This message was added … Read more

Nav walker, bootstrap: Display 3rd level items under 2nd level

I solved this problem. follow these instructions….. Add script (function($){ $(document).ready(function(){ $(‘ul.dropdown-menu [data-toggle=dropdown]’).on(‘click’, function(event) { event.preventDefault(); event.stopPropagation(); $(this).parent().siblings().removeClass(‘open’); $(this).parent().toggleClass(‘open’); }); }); })(jQuery); 2.Remove && $depth === 0 from this line: if ( $args->has_children && $depth === 0 ) in wp_bootstrap_navwalker.php file. See the screenshot here.

How to add text before WordPress menu item href

A Custom Walker would be the best way to add anything anywhere to your wp_nav_menu You hav to keep the following in your function.php <?php class MV_Cleaner_Walker_Nav_Menu extends Walker { var $tree_type = array( ‘post_type’, ‘taxonomy’, ‘custom’ ); var $db_fields = array( ‘parent’ => ‘menu_item_parent’, ‘id’ => ‘db_id’ ); function start_lvl(&$output, $depth) { $indent = … Read more

Add Bootstrap dropdown class to a nav menu

The easiest way to do this is to use an off-the-shelf solution. There is a WP_Bootstrap_Navwalker class which extends WordPress’ native Walker_Nav_Menu class and makes your Navigation Menus ready for Bootstrap 3 or 4. Download it from GitHub. Add it to your theme, then add the following to the functions.php: <?php require_once(‘path-to-the-directory/wp-bootstrap-navwalker.php’); Change path-to-the-directory/ to … Read more

add_action for saving a custom menu

At least in 3.4.1, there is an action for that: wp_update_nav_menu See here. Then you can get the items in your menu with something like: add_action(‘wp_update_nav_menu’, ‘my_get_menu_items’); function my_get_menu_items($nav_menu_selected_id) { $items = wp_get_nav_menu_items($nav_menu_selected_id); }

How to add nofollow to wp_nav_menu

As you can see above, the Advanced Menu Properties are hidden under the Screen Options pull down tab located in the upper-right corner of WordPress Dashboard. NOTE: Make sure that you are in the Menus screen: http://yoursite.com/wp-admin/nav-menus.php W.r.t your question, the Link Relationship (XFN) option is what you want “check”. Then the appropriate field will … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)