• when i test the result on local, there was no error or warning show,

    after i upload to server and the error show on page

    Warning: Illegal offset type in isset or empty in /home1/kpadmin/etenbo.com/wp-includes/class-wp-walker.php on line 149

    here is my website link http://etenbo.com

    here is my code for walker

    class SH_Nav_Menu_Walker extends Walker {

    function start_el(&$output, $item, $depth, $args) {
    $value = ”;
    $classes = empty( $item->classes ) ? array() : (array) $item->classes;
    $classes = in_array( ‘current-menu-item’, $classes ) ? array( ‘selectedlink’ ) : array();
    $class_names = join( ‘ ‘, apply_filters( ‘nav_menu_css_class’, array_filter( $classes ), $item, $args ) );
    $class_names = strlen( trim( $class_names ) ) > 0 ? ‘ class=”outer ‘ . esc_attr( $class_names ) . ‘”‘ : ‘class=”outer”‘;
    $id = apply_filters( ‘nav_menu_item_id’, ”, $item, $args );
    $id = strlen( $id ) ? ‘ id=”‘ . esc_attr( $id ) . ‘”‘ : ”;
    $attributes = ! empty( $item->attr_title ) ? ‘ title=”‘ . esc_attr( $item->attr_title ) .'”‘ : ”;
    $attributes .= ! empty( $item->target ) ? ‘ target=”‘ . esc_attr( $item->target ) .'”‘ : ”;
    $attributes .= ! empty( $item->xfn ) ? ‘ rel=”‘ . esc_attr( $item->xfn ) .'”‘ : ”;
    $attributes .= ! empty( $item->url ) ? ‘ href=”‘ . esc_attr( $item->url ) .'”‘ : ”;
    $item_output = $args->before;
    $item_output .= ‘<li ‘.$class_names.’ ><a’. $attributes . $id . $value . ‘>’;
    $item_output .= ‘<span class=”word”>’;
    $item_output .= $args->link_before . apply_filters( ‘the_title’, $item->title, $item->ID ) . $args->link_after;
    $item_output .= ‘</span>’;
    $item_output .= “\n”;
    $item_output .= $args->after;
    $output .= apply_filters( ‘walker_nav_menu_start_el’, $item_output, $item, $depth, $args );
    }
    }
    class Footer_Nav_Menu_Walker extends Walker {

    function start_el(&$output, $item, $depth, $args) {
    $value = ”;
    $classes = empty( $item->classes ) ? array() : (array) $item->classes;
    $classes = in_array( ‘current-menu-item’, $classes ) ? array( ‘selectedlink’ ) : array();
    $class_names = join( ‘ ‘, apply_filters( ‘nav_menu_css_class’, array_filter( $classes ), $item, $args ) );
    $class_names = strlen( trim( $class_names ) ) > 0 ? ‘ class=”outer ‘ . esc_attr( $class_names ) . ‘”‘ : ‘class=”outer”‘;
    $id = apply_filters( ‘nav_menu_item_id’, ”, $item, $args );
    $id = strlen( $id ) ? ‘ id=”‘ . esc_attr( $id ) . ‘”‘ : ”;
    $attributes = ! empty( $item->attr_title ) ? ‘ title=”‘ . esc_attr( $item->attr_title ) .'”‘ : ”;
    $attributes .= ! empty( $item->target ) ? ‘ target=”‘ . esc_attr( $item->target ) .'”‘ : ”;
    $attributes .= ! empty( $item->xfn ) ? ‘ rel=”‘ . esc_attr( $item->xfn ) .'”‘ : ”;
    $attributes .= ! empty( $item->url ) ? ‘ href=”‘ . esc_attr( $item->url ) .'”‘ : ”;
    $item_output = $args->before;
    $item_output .= ‘<a’. $attributes . $id . $value . ‘>’;
    $item_output .= $args->link_before . apply_filters( ‘the_title’, $item->title, $item->ID ) . $args->link_after;
    $item_output .= ”;
    $item_output .= “\n”;
    $item_output .= $args->after;
    $output .= apply_filters( ‘walker_nav_menu_start_el’, $item_output, $item, $depth, $args );
    }
    }

    anyone can help me please……….~~~~~~~~~~~~

  • The topic ‘Nav menu walker show: Warning: Illegal offset type’ is closed to new replies.