este Codigo esta pegado en el header donde quiero que cargue el menu
Código PHP :
<body> <div class="wrapper"> <header class="bg-image-1"> <section class="wall"> <div class="container"> <h1> <div class="logo"><a href=""><img src="<?php bloginfo('template_url')?>/images/logo.png" alt="<?php bloginfo('name'); ?>" style="max-width: 110%; width: 110%;"></a></div> </h1> </div> </section> <section> <div class="container container-stuck"> <nav class="navbar navbar-default"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="col-md-7"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#defaultNavbar1" aria-expanded="false"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button> <h2 class="mobile-title">Menu</h2> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="defaultNavbar1"> <?php wp_nav_menu( array( 'container' =>false, 'menu_id' => 'nav', 'echo' => true, 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => 0, 'walker' => new description_walker()) <!--/*esta es la linea 58*/--> ) ; ?> </div> <!-- /.navbar-collapse --> </div> <div class="col-md-5"> <ul class="list-social"> <li><a href="" class="icon-social fa fa-facebook"></a></li> <li><a href="" class="icon-social fa fa-instagram"></a></li> <li><a href="" class="icon-social fa fa-youtube-play"></a></li> </ul> </div> <!-- /.container-fluid --> </nav> </div> </section> </header><!--final header--> </div> </body> </html>
y este otro codigo esta en Function.php
Código PHP :
register_nav_menus( array( 'menu-top' => 'Menu superior', 'menu' => 'Menu principal' ) ); class description_walker extends Walker_Nav_Menu { function start_el(&$output, $item, $depth, $args) { global $wp_query; $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; $class_names = $value = ''; $classes = empty( $item->classes ) ? array() : (array) $item->classes; $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); $class_names = ' class="'. esc_attr( $class_names ) . '"'; $output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $class_names .'>'; $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 ) .'"' : ''; $prepend = '<strong>'; $append = '</strong>'; $description = ! empty( $item->description ) ? '<span>'.esc_attr( $item->description ).'</span>' : ''; if($depth != 0) { $description = $append = $prepend = ""; } $item_output = $args->before; $item_output .= '<a'. $attributes .'>'; $item_output .= $args->link_before .$prepend.apply_filters( 'the_title', $item->title, $item->ID ).$append; $item_output .= $description.$args->link_after; $item_output .= '</a>'; $item_output .= $args->after; $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); } }
y al verlo en el Explorador me marca el siguiente Error
Código HTML :
( ! ) Fatal error: Class 'description_walker' not found in C:\wamp64\www\wordpress\wp-content\themes\pisos\header.php on line 58 Call Stack # Time Memory Function Location 1 0.0002 237904 {main}( ) ...\index.php:0 2 0.0004 241008 require( 'C:\wamp64\www\wordpress\wp-blog-header.php' ) ...\index.php:17 3 0.3212 27289832 require_once( 'C:\wamp64\www\wordpress\wp-includes\template-loader.php' ) ...\wp-blog-header.php:19 4 0.3360 27715048 include( 'C:\wamp64\www\wordpress\wp-content\themes\pisos\index.php' ) ...\template-loader.php:74
y en la apariencia de Wordpress no me aparece tampoco la opcion menu y tampoco se pork anexo imagen
Porfavor Ayuda ya estoy vuelto Loco y no hayo la solucion