Ocultar menú de la portada del tema Enigma
-
Quiero ocultar el menú de la portada y no encuentro la manera ya que llevo poco con esto, pego el código de la página donde esta el código de menú…
————————————————————————<?php
function weblizar_page_menu_args( $args ) {
if ( ! isset( $args[‘show_home’] ) )
$args[‘show_home’] = true;
return $args;
}
add_filter( ‘wp_page_menu_args’, ‘weblizar_page_menu_args’ );function weblizar_fallback_page_menu( $args = array() ) {
$defaults = array(‘sort_column’ => ‘menu_order, post_title’, ‘menu_class’ => ‘menu’, ‘echo’ => true, ‘link_before’ => », ‘link_after’ => »);
$args = wp_parse_args( $args, $defaults );
$args = apply_filters( ‘wp_page_menu_args’, $args );$menu = »;
$list_args = $args;
// Show Home in the menu
if ( ! empty($args[‘show_home’]) ) {
if ( true === $args[‘hide_home’] || ‘1’ === $args[‘show_home’] || 1 === $args[‘show_home’] )
$text = __(‘Home’,’weblizar’);
else
$text = $args[‘show_home’];
$class = »;
if ( is_front_page() && !is_paged() )
$class = ‘class=»current_page_item»‘;
$menu .= ‘<li ‘ . $class . ‘>’ . $args[‘link_before’] . $text . $args[‘link_after’] . »;// If the front page is a page, add it to the exclude list
if (get_option(‘show_on_front’) == ‘page’) {
if ( !empty( $list_args[‘exclude’] ) ) {
$list_args[‘exclude’] .= ‘,’;
} else {
$list_args[‘exclude’] = »;
}
$list_args[‘exclude’] .= get_option(‘page_on_front’);
}
}$list_args[‘echo’] = false;
$list_args[‘title_li’] = »;
$list_args[‘walker’] = new weblizar_walker_page_menu;
$menu .= str_replace( array( «\r», «\n», «\t» ), », wp_list_pages($list_args) );if ( $menu )
$menu = ‘<ul class=»‘. esc_attr($args[‘menu_class’]) .'»>’ . $menu . »;$menu = ‘<div class=»‘ . esc_attr($args[‘container_class’]) . ‘»>’ . $menu . «</div>\n»;
$menu = apply_filters( ‘wp_page_menu’, $menu, $args );
if ( $args[‘echo’] )
echo $menu;
else
return $menu;
}
class weblizar_walker_page_menu extends Walker_Page{
function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat(«\t», $depth);
$output .= «\n$indent<ul class=’dropdown-menu’>\n»;
}
function start_el( &$output, $page, $depth=0, $args = array(), $current_page = 0 ) {
if ( $depth )
$indent = str_repeat(«\t», $depth);
else
$indent = »;extract($args, EXTR_SKIP);
$css_class = array(‘page_item’, ‘page-item-‘.$page->ID);
if ( !empty($current_page) ) {
$_current_page = get_post( $current_page );
if ( in_array( $page->ID, $_current_page->ancestors ) )
$css_class[] = ‘current_page_ancestor’;
if ( $page->ID == $current_page )
$css_class[] = ‘current_page_item’;
elseif ( $_current_page && $page->ID == $_current_page->post_parent )
$css_class[] = ‘current_page_parent’;
} elseif ( $page->ID == get_option(‘page_for_posts’) ) {
$css_class[] = ‘current_page_parent’;
}$css_class = implode( ‘ ‘, apply_filters( ‘page_css_class’, $css_class, $page, $depth, $args, $current_page ) );
$output .= $indent . ‘<li class=»‘ . $css_class . ‘»>ID) . ‘»>’ . $link_before . apply_filters( ‘the_title’, $page->post_title, $page->ID ) . $link_after . »;
if ( !empty($show_date) ) {
if ( ‘modified’ == $show_date )
$time = $page->post_modified;
else
$time = $page->post_date;$output .= » » . mysql2date($date_format, $time);
}
}
}
?>————————————————————————
Probé a cambiar los true por false pero no conseguí que desapareciese la opción menú.Mi web es http://www.webentuempresa.es
Muchas gracias
- El debate ‘Ocultar menú de la portada del tema Enigma’ está cerrado a nuevas respuestas.