Walker Menu in WordPress

Walker Menu in WordPress

screen109

screen110

/*Custom Header Menu*/
class IBenic_Walker extends Walker_Nav_Menu {
    
    function start_el(&$output, $item, $depth=0, $args=array(), $id = 0) {
    	$object 			= $item->object;
    	$type 				= $item->type;
    	$title 				= $item->title;
    	$description 		= $item->description;
    	$permalink 			= $item->url;


    	$anchorclass = '';
    	if($item->ID == 1372){
    		$anchorclass = 'btn';
    	}

    	$output .= "
  • "; if( $permalink && $permalink != '#' && $depth == 0 ) { $output .= "".$description"; $output .= $title; }else{ $output .= ""; $output .= $title; } if( $permalink && $permalink != '#' ) { $output .= ''; } } }
  • screen111

    Leave a Reply

    Your email address will not be published. Required fields are marked *