【问题标题】:Understrap customize Blog Page - Unclear which page and where to modifyUnderstrap 自定义博客页面 - 不清楚哪个页面以及在哪里修改
【发布时间】:2020-07-10 09:46:56
【问题描述】:

我是 Understrap 的新手,我想在显示所有帖子的博客页面上添加一些 margin-top。与我使用的其他空白 wordpress 主题启动器不同,我还不知道将页边距添加到帖子页面的结构。在content.php single.phpcontent-single 之间,我有点迷茫。如果有人可以指导我,我将非常感激。

【问题讨论】:

    标签: php wordpress bootstrap-4


    【解决方案1】:

    我发现我不得不修改 index.php 页面。 我还想在我的 Resent 帖子页面中添加一个标题,所以我修改了索引 php:

    <div class="wrapper" id="index-wrapper">
    <div class="darkness"></div>
        <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
    
            <div class="row">
    
                <!-- Do the left sidebar check and opens the primary div -->
                <?php get_template_part( 'global-templates/left-sidebar-check' ); ?>
    
                <main class="site-main" id="main">
                    <h1 class="mb-3">Recent Posts</h1>
                    <?php if ( have_posts() ) : ?>
    
                        <?php /* Start the Loop */ ?>
    
                        <?php while ( have_posts() ) : the_post(); ?>
    

    类 dark 的 div 是在页面顶部添加一些额外的边距和颜色,以放在透明标题的后面。最后,这就是我所需要的。

    【讨论】:

      猜你喜欢
      • 2021-04-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-04
      • 1970-01-01
      • 2012-09-18
      • 2021-07-06
      • 1970-01-01
      相关资源
      最近更新 更多