Menu item hidden behind others

You are correct that this is definitely a CSS issue. To get the 3rd level menu to show up fully, you’ll want to target it and move it X number of pixels from the left until it lines up correctly. If your sub-menu’s have a set width, then use that set width to move the … Read more

wp_nav_menu not selecting teh correct menu

I faced the same issue and finally got the answer: For functions.php: register_nav_menu( ‘primary’, __( ‘Navigation Menu’, ‘Removemymug_Theme’ ) ); register_nav_menu( ‘second-menu’, __( ‘Second Menu’, ‘Removemymug_Theme’ ) ); For Secondary Menu (Footer): wp_nav_menu( array( ‘menu’ => ‘second-menu’, ‘theme_location’ => ‘second-menu’, ‘depth’ => 2, ‘container’ => ‘div’, ‘container_class’ => ‘navbar-collapse collapse’, ‘menu_class’ => ‘nav navbar-nav navbar-right’, … Read more

add custom entries to menu options

Here a very quick example. The idea is to add a new meta box in the menu configuration. add_meta_box is used in admin_head-nav-menus.php page: class Custom_Nav { function __construct() { add_action( ‘admin_head-nav-menus.php’, array( $this, ‘add_nav_menu_meta_boxes’ ) ); } public function add_nav_menu_meta_boxes() { add_meta_box( ‘custom_links’, __(‘Custom links’), array( $this, ‘nav_menu_link’), ‘nav-menus’, ‘side’, ‘low’ ); } public … Read more

WordPress menus – automatically generate

Use the WP database (via proper methods) to store a ‘is this the first run’ flag? Then just conditionally execute. check for flag in wp db if exist do nothing if not exist create me my menus dag nammit remember to set flag for next round so its only done once Something like that? If … Read more

Change header menu login-logout without changing main menu

You should add a class to the header when the user is logged in, this way, only your css would have to change. You can do it like this in your header.php file : <header class=”header clear <?php echo ((is_user_logged_in())?’logged-in-header’:’not-logged-in-header’); ?>” role=”banner”>

How to get the title of root li element

In a nutshell, assuming you are using a walker to construct your menu. E.g. when customizing the start_el() method, the $item should be an object – somewhat – like the $post object. In reverse that means, you have access to post_parent property. With that information you can retrieve the title with get_the_title() easily. After your … Read more

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