【问题标题】:how to get full width in my wordpress page template?如何在我的 wordpress 页面模板中获得全宽?
【发布时间】:2021-10-26 16:12:43
【问题描述】:

我必须在 Wordpress 中创建一个全角页面模板。但我不明白为什么,即使我只调用我的“sidebar-bas”,我也显示了“sidebar-droite”:/

希望有人能帮帮我

<?php
/*
Template Name: Full Width
*/
?>
<?php get_header();
if(have_posts()): while(have_posts()): the_post();?>
        <section id="pages" class="haut avecAside">
        <section id="pages" class="haut">
        <h2><?php the_title(); ?></h2>
        <?php the_content(); ?>
        </section>
    <?php endwhile;
    endif;
    get_sidebar( 'sidebar-bas' );
    get_footer();?>

【问题讨论】:

  • 问题的标题与问题本身不匹配。那么,您是否试图获得一个侧栏,但它正在显示另一个?

标签: php wordpress templates wordpress-theming


【解决方案1】:

确认您的 sidebar-bas 模板文件中不包含 get_sidebar( 'sidebar-droite' )

【讨论】:

  • 是的,你是对的!它包括两者,非常感谢;)
猜你喜欢
  • 2013-02-22
  • 2022-08-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多