andrewfong
Forum Replies Created
-
Forum: Plugins
In reply to: [Multisite Language Switcher] Navigational MenuOk no so ‘register_nav_menu’ or menus in the functions.php.
I have found the correct section located in the theme-functions.php of my theme in the editor.
/*-----------------------------------------------------------------------------------*/ /* Register WP Menus */ /*-----------------------------------------------------------------------------------*/ if ( function_exists( 'wp_nav_menu') ) { add_theme_support( 'nav-menus' ); register_nav_menus( array( 'top-menu' => __( 'Top Menu', 'woothemes' ) ) ); }Adding this
function my_custom_menu_item( $items, $args ) {
if ( class_exists( ‘MslsOutput’ ) && ‘primary’ == $args->theme_location ) {
$obj = new MslsOutput;
$arr = $obj->get( 2 );
if ( !empty( $arr ) ) {
$items .= ‘- ‘ . implode( ‘
- ‘, $arr ) . ‘
‘;
}
}
return $items;
}
add_filter( ‘wp_nav_menu_items’, ‘my_custom_menu_item’, 10, 2 );doesn’t do anything. What should I change and where should I insert it?
Forum: Plugins
In reply to: [Multisite Language Switcher] Navigational MenuThanks realloc – I’ll try that now & post results asap.
No luck. Any other thoughts?
Forum: Plugins
In reply to: [Multisite Language Switcher] Navigational MenuThanks for the reply. I have tried the final method with no luck – is there a way of viewing the page source to find out what the table is called in my theme?