当小部件没有显示时,我的wordpress页面上似乎出现了问题,但我不知道如何编辑这个小部件。
homepage.php在Appearance>Editor下的代码是
<section class="row post_content">
<div class="col-sm-8">
<?php the_content(); ?>
</div>
<?php get_sidebar('sidebar2'); // sidebar 2 ?>
</section> <!-- end article header -->当边栏应该显示的页面上出现错误消息时,我会在哪里找到“sidebar2”的代码?
发布于 2016-06-11 06:53:52
正如get_sidebar()开发人员手册中所概述的那样,您的侧边栏文件应该称为sidebar-sidebar2.php。此文件将出现在活动主题的根目录中。
get_sidebar()钩子允许使用特定的侧栏模板文件来代替默认的侧栏模板文件。如果您的文件名为侧栏-new.php,您将将钩子中的文件名指定为get_sidebar( 'new‘)。
https://stackoverflow.com/questions/37744713
复制相似问题