Networkwide Menu & Css-classes

Hello.

I'm using this excellent plugin http://wpmututorials.com/plugins/networkwide-menu/

It doesn't include css-classes to the output on subsites.. I have enabled css-classes for the menu items from wordpress admin/menus.. I use classes for adding custom icon for each menu item.

Menu items and icons should be exactly same on every site. Now it is showing only menu items without icons.

Plugin provider says it should be easy to customize.. Any ideas how to get this work?

Takes few line of code to make it work? :wink:

Here is the original plugin:

`
$slot = 1;

function ra_wp_nav_menu_filter( $content, $args ) {
global $slot;

$registered = get_registered_nav_menus();
$current = array_slice( $registered, absint( $slot - 1 ), 1 );
if( empty( $current ) || empty( $current[$args->theme_location] ) )
return $content;

if( !is_main_site() ) {
$network_menu = get_site_option( 'ra_network_menu' );
if( !empty( $network_menu ) )
return $network_menu;
} elseif( !get_option( 'ra_network_menu' ) ) {
update_option( 'ra_network_menu', '1' );
update_site_option( 'ra_network_menu', $content );
}

return $content;
}
add_filter( 'wp_nav_menu_objects', 'ra_wp_nav_menu_filter', 10, 2 );

function ra_wp_nav_menu_flush( $post_id, $post ) {
if( is_main_site() && $post->post_type == 'nav_menu_item' )
update_option( 'ra_network_menu', '' );
}
add_action( 'save_post', 'ra_wp_nav_menu_flush', 10, 2 );

  • PC
    • WPMU DEV Initiate

    Hey there ,

    Thanks for posting on the forums.

    That is a pretty old post. I am not sure if the plugin is even updated for the latest WordPress release or not ?

    It doesn't include css-classes to the output on subsites.. I have enabled css-classes for the menu items from wordpress admin/menus.. I use classes for adding custom icon for each menu item.

    Menu items and icons should be exactly same on every site. Now it is showing only menu items without icons.

    I am gonna need to see things in action. Atleast a few screenshots which explain the issue and how this networkwide menu plugin works. Perhaps there are better options out there in the wild !

    Please advise

    Cheers
    PC
    Sales &Support

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.