我想使用Genesis创建自定义模板。。我添加了一个自定义菜单,只需在WIDGETS部分添加一个小部件,并将其放置在页面的右上角。但我想在特定的模板中删除它。。。我该怎么做??
<?php
/*
Template Name: No Menu - Full Page
*/
?>
<?php get_header(); ?>
<?php if ( has_post_thumbnail() ) { ?>
<div id="featured">
<?php the_post_thumbnail(); ?>
</div>
<?php } ?>
<?php genesis_before_content_sidebar_wrap(); ?>
<div id="content-sidebar-wrap">
<?php genesis_before_content(); ?>
<div id="content" class="hfeed">
<?php genesis_before_loop(); ?>
<?php genesis_loop(); ?>
<?php genesis_after_loop(); ?>
</div>
<!-- end #content -->
<?php genesis_after_content(); ?>
</div>
<!-- end #content-sidebar-wrap -->
<?php genesis_after_content_sidebar_wrap(); ?>
<?php get_footer(); ?>
我想我只是不知道密码。。但我希望在自定义模板中删除此内容
genesis_header_right
使用Inspect元素,我复制了整个标题的HTML版本
<div id="header">
<div class="wrap">
<div id="title-area">
<div class="genesis_hook" title="By default, this hook outputs the site title, within the header area. It uses the user-specified SEO settings to build the site title markup appropriately.">genesis_site_title</div>
<h1 id="title"><a href="http://localhost/mysite/" title="Title">Title</a></h1>
<div class="genesis_hook" title="By default, this hook outputs the site description, within the header area. It uses the user-specified SEO settings to build the site description markup appropriately.">genesis_site_description</div>
<p id="description">Just another WordPress site</p>
</div>
<!-- end #title-area -->
<div class="widget-area">
<div class="genesis_hook" title="This hook executes immediately before the Header Right widget area inside div.widget-area.">genesis_header_right</div>
<div id="nav_menu-2" class="widget widget_nav_menu">
<div class="widget-wrap">
<div class="menu-top-menu-container">
<ul id="menu-top-menu" class="menu genesis-nav-menu sf-js-enabled">
<li id="menu-item-172" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item menu-item-home menu-item-172"><a href="http://localhost/mysite">Home</a></li>
</ul>
</div>
</div>
</div>
</div>
<!-- end .widget-area --></div>
<!-- end .wrap --></div>
这是我想删除的代码
<div class="widget-area">
<div class="genesis_hook" title="This hook executes immediately before the Header Right widget area inside div.widget-area.">genesis_header_right</div>
<div id="nav_menu-2" class="widget widget_nav_menu">
<div class="widget-wrap">
<div class="menu-top-menu-container">
<ul id="menu-top-menu" class="menu genesis-nav-menu sf-js-enabled">
<li id="menu-item-172" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item menu-item-home menu-item-172"><a href="http://localhost/mysite">Home</a></li>
</ul>
</div>
</div>
</div>
</div>
我试着在get头代码下面添加这个
unregister_sidebar( \'header-right\' );
什么都没做