我注册了一些自定义侧栏,我的Twentyle2Theme版本中的相应代码现在如下所示:
register_sidebar( array(
\'name\' => __( \'Sidebar #1\', \'twentytwelve\' ),
\'id\' => \'sidebar-1\',
\'description\' => __( \'Appears on posts and pages except the optional Front Page template, which has its own widgets\', \'twentytwelve\' ),
\'before_widget\' => \'<aside id="%1$s" class="widget %2$s">\',
\'after_widget\' => \'</aside>\',
\'before_title\' => \'<h3 class="widget-title">\',
\'after_title\' => \'</h3>\',
) );
register_sidebar( array(
\'name\' => __( \'Sidebar #2\', \'twentytwelve\' ),
\'id\' => \'sidebar-2\',
\'description\' => __( \'Appears on posts and pages except the optional Front Page template, which has its own widgets\', \'twentytwelve\' ),
\'before_widget\' => \'<aside id="%1$s" class="widget %2$s">\',
\'after_widget\' => \'</aside>\',
\'before_title\' => \'<h3 class="widget-title">\',
\'after_title\' => \'</h3>\',
) );
register_sidebar( array(
\'name\' => __( \'Sidebar #3\', \'twentytwelve\' ),
\'id\' => \'sidebar-3\',
\'description\' => __( \'Appears on posts and pages except the optional Front Page template, which has its own widgets\', \'twentytwelve\' ),
\'before_widget\' => \'<aside id="%1$s" class="widget %2$s">\',
\'after_widget\' => \'</aside>\',
\'before_title\' => \'<h3 class="widget-title">\',
\'after_title\' => \'</h3>\',
) );
register_sidebar( array(
\'name\' => __( \'Sidebar #4\', \'twentytwelve\' ),
\'id\' => \'sidebar-4\',
\'description\' => __( \'Appears on posts and pages except the optional Front Page template, which has its own widgets\', \'twentytwelve\' ),
\'before_widget\' => \'<aside id="%1$s" class="widget %2$s">\',
\'after_widget\' => \'</aside>\',
\'before_title\' => \'<h3 class="widget-title">\',
\'after_title\' => \'</h3>\',
) );
register_sidebar( array(
\'name\' => __( \'Sidebar #5\', \'twentytwelve\' ),
\'id\' => \'sidebar-5\',
\'description\' => __( \'Appears on posts and pages except the optional Front Page template, which has its own widgets\', \'twentytwelve\' ),
\'before_widget\' => \'<aside id="%1$s" class="widget %2$s">\',
\'after_widget\' => \'</aside>\',
\'before_title\' => \'<h3 class="widget-title">\',
\'after_title\' => \'</h3>\',
) );
我的自定义页面模板使用#侧边栏-1:
<div id="inner-page-sidebar">
<?php get_sidebar(); ?>
</div> <!-- END INNER-PAGE-SIDEBAR -->
现在,我想创建一个单独的自定义页面模板#2,它应该与自定义页面模板#1相同,只是它应该使用#提要栏-2而不是#提要栏-1。
Question: 我应该如何将备选侧边栏放在那里?
提前感谢您的帮助!