Tag Info

New answers tagged

0

your problem is in your use 'menu_class' and 'items_wrap' not synchronized. You can edit : wp_nav_menu( array( 'theme_location' => 'header-menu', 'container' => '', 'echo' => '0', 'menu_class' => 'nav-menu horiz-menu container sixteen columns', 'items_wrap' => ...


0

You just need the last part of your function where you switch to blog 1 and get the menu. function wp_multisite_nav_menu() { $args = array( 'menu' => 'Main Menu', 'theme_location' => 'main-nav' ); switch_to_blog( 1 ); echo wp_nav_menu( $args ); restore_current_blog(); }


0

Here's a function I use to add a first / last class to wp_nav_menu() items: function add_first_and_last($items) { $items[1]->classes[] = 'first'; $items[count($items)]->classes[] = 'last'; return $items; } add_filter('wp_nav_menu_objects', 'add_first_and_last');


0

It seems to me that you could handle this through CSS in that you could hide the lower level menu options by default, and then choose to show them if they have certain classes above them. On this Codex page, you can see the menu classes (and on your page itself). So for the "second level" you described, assuming the first level menu is level 1 - not 0. ul ...


1

I think I got the answer: function my_nav_menu( $args = array() ) { $echo = isset( $args['echo'] ) ? (bool)( $args['echo'] ) : true; $args['echo'] = false; add_filter( 'wp_nav_menu_objects' , 'my_filter_nav_menu' , 100 , 2 ); $menu = wp_nav_menu( $args ); remove_filter( 'wp_nav_menu_objects' , 'my_filter_nav_menu' , 100, 2 ); ...


0

Fix for Bootstrap 'navbar-fixed-top' to prevent overlapping of site menu with WordPress admin menu .admin-bar .navbar-fixed-top { top:46px; @media screen and (min-width:782px) { top:32px; } }


0

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( ...


1

Not a specific answer, but will be too long for a comment. You could also try looking at the code that WordPress core uses itself. I know you said you couldn't use the check box that auto-adds pages, but you could look over how it is being used. A little digging around (with a decent text editor you should be able to search for a phrase throughout the entire ...


0

Adding this directive at the beginning of the .htaccess file should do the trick: DirectoryIndex index.php If this doesn't do the trick, try creating an .htaccess file in the wp-admin folder and place this directive in there (depending on what HTTP server your system runs on and a variety of other settings, modifying just the .htaccess in the root domain ...



Top 50 recent answers are included