admin管理员组文章数量:1388822
i´m creating theme is my first theme and i have a problem with panel nav menu of wordpress, I´m creating the order of nav menu in the panel wordpress and does not order, i was make page and automatically the page add to nav menu, i need delete a page of menu and doesnt not eliminate.
this is my header.php
<!DOCTYPE html>
<html lang="<?php language_attributes () ?>">
<head>
<meta charset = "<?php bloginfo ('charset');?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php wp_title (); ?></title>
<?php wp_head(); ?>
</head>
<body class="<?php body_class(); ?>">
<div id="app-yahcrea" class="app-yahcrea">
<!-- Comienza el menu -->
<header class="header-yahcrea">
<div class="content-header-yahcrea">
<div id="menu-icon" class="menu-icon">
<span class="icon-menu"></span>
<span class="icon-menu"></span>
<span class="icon-menu"></span>
</div>
<div class="menu-mobile" id="menu-mobile">
<nav class="mobile-nav-yahcrea">
<?php
wp_nav_menu(array(
'container' => true,
'items_wrap' => '<ul id="menu-top">%3$</ul>',
'theme_location' => 'Primary',
'walker' => new Walker_Nav_Menu
));
?>
</nav>
</div>
<div class="logo-yahcrea"> <?php
$custom_logo_id = get_theme_mod( 'custom_logo' );
$logo = wp_get_attachment_image_src( $custom_logo_id , 'full' );
if ( has_custom_logo() ) {
the_custom_logo();
} else {
echo '<a href="'.home_url().'"><img width="64" height="64"src="'. get_stylesheet_directory_uri() . './assets/images/PerfilFblanco.png' .'"></a>';
}
?></div>
<nav class="nav-yahcrea">
<?php
if(has_nav_menu('primary')){
wp_nav_menu(
array(
'theme_location' => 'Primary',
'container' => 'div',
'container_class' => 'collapse navbar-collapse',
'container_id' => 'navbarSupportedContent',
'items_wrap' => '<ul class="navbar-nav ml-auto text-center">%3$s</ul>',
'menu_class' => 'nav-item',
'echo' => true,
'fallback_cb' => 'wp_page_menu', // en caso de que el menu no exista cargar wp_page_menu
'before' => '', // texto antes del texto del enlace.
'after' => '', // texto despues del texto del enlace.
'link_before' => '<span>', // <a href=""><span> ....
'link_after' => '</span>', // </span></a>
'item_spacing' => 'preserve', // preserve / discard
'depth' => 2, // numero de niveles que serán mostrados
'walker' => ''
)
);
}
?>
</nav>
</div>
</header>
Functions.php, i want add the walker class but, I don't know what it's for that, if add the order menu or dont...
function yahcreatheme(){
register_nav_menus(
array(
'primary' => __('Primary Menu', 'Yahcrea Theme'),
'secondary' => __('Secondary Menu', 'Yahcrea Theme')
)
);
}
How can i add in my theme custom background for each page?
本文标签: themesStructuring Nav Menu and Background Custom page (Help)
版权声明:本文标题:themes - Structuring Nav Menu and Background Custom page (Help) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744592705a2614589.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论