Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter andrewfong

    (@andrewfong)

    Ok 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?

    Thread Starter andrewfong

    (@andrewfong)

    Thanks realloc – I’ll try that now & post results asap.

    No luck. Any other thoughts?

    Thread Starter andrewfong

    (@andrewfong)

    Thanks 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?

Viewing 3 replies - 1 through 3 (of 3 total)