dongxu2398 2017-11-21 22:24
浏览 79
已采纳

如何制作二十七页内容全宽

I want to make wordpress default theme, Twenty-seventeen, pages content to be full width. Below is the content-page.php file in template-parts i am trying to modify. I am not sure if i should modify something else. I should remove the sidebars in order for the content to be full width.

<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-## -->

Thanks to @Dipak i managed to do it with some css:

I suggest to use a page template inside a child theme and modify that template with css. You can also try this ready made full width template.

@media screen and (min-width: 1200px) {
 /* For devices with more than ore equal to 1200px width */
    .wrap {

        max-width:100%!important;
    }
}
  • 写回答

1条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 内存管理的一段代码不是很理解
      • ¥20 打开anaconda时卡在Loading applications无法进入界面
      • ¥15 网页超时时间设置失效
      • ¥15 有关绿色信贷毕业论文的问题
      • ¥30 关于#机器人#的问题,如何解决?
      • ¥15 求MATLAB函数ScalarLayerDisplay的代码
      • ¥15 安卓如何自动执行检测到的NFC标签,无需再点确认
      • ¥15 pyHM库mouse模块的ValueError错误
      • ¥15 python opencv 摄像头 传感器
      • ¥30 eMMC&Android&C&Linux