我想让wordpress默认主题,二十七,页面内容为全宽。下面是我试图修改的模板部分中的 content-page.php 文件。我不确定是否应该修改其他内容。我应该删除侧边栏以使内容为全宽。
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<?php twentyseventeen_edit_link( get_the_ID() ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
</article><!-- #post-## -->
感谢@Dipak,我设法用一些css来做到这一点:
我建议在子主题中使用页面模板并使用CSS修改该模板。您也可以尝试这个现成的全宽模板。
@media screen and (min-width: 1200px) {
/* For devices with more than ore equal to 1200px width */
.wrap {
max-width:100%!important;
}
}
如果您需要使二十七个Wordpress全屏显示,我找到了一个简单的答案。
就是这样。