WP /wp-admin/admin-ajax.php produces 404

Your /wp-admin/admin-ajax.php might have been modified by another php file or plugin. Try downloading a copy of your wordpress version and overwrite admin-ajax.php with the original source file. If that doesn’t work, try deactivating your plugins (or theme) one by one until you notice a difference.

Second nav is merged with the first in mobile

In functions.php, change the function magazine_responsive_menu_settings() to the following: function magazine_responsive_menu_settings() { $settings = [ ‘mainMenu’ => __( ‘Menu’, ‘magazine-pro’ ), ‘subMenu’ => __( ‘Submenu’, ‘magazine-pro’ ), ‘menuClasses’ => [ ‘combine’ => [ ‘.nav-primary’, ‘.nav-header’, ], ], ]; return $settings; } Basically, in the combine, I removed ‘.nav-secondary’, This is how it looks like now

BuddyPress – How to add logout in nav menu

Google is your friend. Here is a snippit I found I didn’t test it but seems logical. // functions.php function add_login_logout_link($items, $args) { if(is_user_logged_in()) { $newitems=”<li><a title=”Logout” href=””. wp_logout_url(‘index.php’) .'”>Logout</a></li>’; $newitems .= $items; } else { $newitems=”<li><a title=”Login” href=””. wp_login_url(‘index.php’) .'”>Login</a></li>’; $newitems .= $items; } return $newitems; } add_filter(‘wp_nav_menu_items’, ‘add_login_logout_link’, 10, 2); Source

Accesibility problems with dropdown menus in twentyten theme or others

This is a known issue with the Twenty Ten theme, arising from both the theme and core code. Twenty Ten has a number of accessibility issues – see Trac: http://core.trac.wordpress.org/ticket/14782 Some of these have been corrected in a child theme for Twenty Ten that you can get here: http://accessible.sprungmarker.de/2011/01/accessible-1-0/ The CSS and functions in the … Read more

Hide and show menu subpages

I think you’re asking how to make a menu with drop downs clickable rather than hoverable, so here’s a very simple example of what I think you want: http://jsfiddle.net/pk5Bx/ HTML <div id=”navigation”> <ul> <li class=”current_page_parent”><a href=”#”>Top level 1</a> <ul> <li><a href=”#”>Submenu 1</a></li> <li><a href=”#”>Submenu 2</a></li> </ul> </li> <li class=”current_page_parent”><a href=”#”>Top level 2</a> <ul> <li><a href=”#”>Submenu … Read more

How to get wordpress nav menu outside of wordpress system?

There are a few ways, here’s one: // no theme output define(‘WP_USE_THEMES’, false); // initializes the entire WordPress require ‘/path/to/your/wp/wp-blog-header.php’; // here you print your menu wp_nav_menu(‘your_theme_menu_location’); Even if theme output is disabled, the theme’s functions.php should still be loaded (and menu locations registered). You should cache the HTML somewhere within your script, because loading … Read more

add span to wp_nav_menu widget

Filter ‘walker_nav_menu_start_el’ and replace the link text. Prototype, not tested: add_filter( ‘walker_nav_menu_start_el’, ‘wpse_56028_title’ ); function wpse_56028_title( $item ) { return preg_replace( ‘~(<a[^>]*>)([^<]*)</a>~’, ‘$1<span>$2</span></a>’, $item); }