Añadir extensión Walker_Nav_Menu con Genesis

1
2
3
4
5
6
7
8
9
10
11
12
// filer wp_nav_menu_args para añadir la extensión walker a wp_nav_menu(), usado por genesis_do_nav()
add_filter( 'wp_nav_menu_args', 'my_navigation_walker' );
 
function my_navigation_walker ( $args ){
    if( isset( $args['menu_class'] ) && 'menu genesis-nav-menu menu-primary' === $args['menu_class'] ) {
	if( class_exists( 'My_Navigation' ) ) {
		$args['walker'] = new My_Navigation(); 
	}
    }
 
    return $args;
 }

Fuente encontrada aquí

Cambiar las migas de pan en Genesis

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 
add_filter('genesis_breadcrumb_args', 'custom_breadcrumbs');
 
function custom_breadcrumbs( $args ) {
  $args['labels']['prefix'] = '';
  return $args;
}
 
/*
Los argumentos por defecto son:
 
$this->args = array(
		'home'                    => __( 'Home', 'genesis' ),
		'sep'                     => 
                'list_sep'                => ', ',
		'prefix'                  => '<div class="breadcrumb">',
		'suffix'                  => '</div>',
		'heirarchial_attachments' => true,
		'heirarchial_categories'  => true,
		'labels' => array(
				'prefix'    => __( 'You are here: ', 'genesis' ),
				'author'    => __( 'Archives for ', 'genesis' ),
				'category'  => __( 'Archives for ', 'genesis' ),
				'tag'       => __( 'Archives for ', 'genesis' ),
				'date'      => __( 'Archives for ', 'genesis' ),
				'search'    => __( 'Search for ', 'genesis' ),
				'tax'       => __( 'Archives for ', 'genesis' ),
				'post_type' => __( 'Archives for ', 'genesis' ),
				'404'       => __( 'Not found: ', 'genesis' ) 
                            )
                  );
 
*/

Cambiar el favicon en Genesis

1
2
3
4
5
6
7
8
// Añade esta función en el archivo functions.php de tu childtheme
function mi_favicon( $favicon_url ) {
 
        $ruta_del_icono = 'la ruta al icono';
	return $ruta_del_icono;
 }
 
 add_filter( 'genesis_pre_load_favicon', 'mi_favicon' );