Как добавить боковую панель на страницу архива - PullRequest
0 голосов
/ 27 апреля 2019

Я хотел бы добавить боковую панель на мою страницу архива по коду.Следующие коды были добавлены в шаблон архива.Боковая панель была успешно добавлена.Тем не менее, боковая панель повторяется пост по почте.

Пожалуйста, помогите мне проверить коды ниже.

<div class="row max_width">
        <div class="small-12 large-8 columns">
    <?php if ( has_post_thumbnail() ) { ?>
        <figure class="post-gallery parallax">
            <div class="parallax_bg"
                        data-top-bottom="transform: translate3d(0px, 20%, 0px);"
                        data-bottom-top="transform: translate3d(0px, -20%, 0px);">
                <?php the_post_thumbnail('notio-single-3x'); ?>
            </div>
        </figure>
    <?php } ?>
            <header class="post-title">
                <?php get_template_part( 'inc/templates/postbits/post-meta' ); ?>
                <h3 itemprop="headline"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
            </header>
            <div class="post-content">
                <?php the_excerpt(); ?>
                <a href="<?php the_permalink(); ?>" class="more-link"><?php esc_html_e( 'Read More', 'notio' ); ?></a>
            </div>
    <?php do_action( 'thb_PostMeta' ); ?>
        </div>
    <div class="small-12 large-3 columns sidebar">
                  <?php if ( is_active_sidebar( 'custom-side-bar' ) ) : ?>
                  <?php dynamic_sidebar( 'custom-side-bar' ); ?>
                  <?php endif; ?>
              </div>
    </div>

1 Ответ

0 голосов
/ 27 апреля 2019

Попробуйте, как показано ниже:

<div class="row max_width">
    <?php
    /* Start the Loop */
    while( have_posts() ) : the_post(); ?>
      <div class="small-12 large-8 columns">
            <?php if ( has_post_thumbnail() ) { ?>
                <figure class="post-gallery parallax">
                    <div class="parallax_bg"
                    data-top-bottom="transform: translate3d(0px, 20%, 0px);"
                    data-bottom-top="transform: translate3d(0px, -20%, 0px);">
                    <?php the_post_thumbnail('notio-single-3x'); ?>
                    </div>
                </figure>
            <?php } ?>
            <header class="post-title">
                <?php get_template_part( 'inc/templates/postbits/post-meta' ); ?>
                <h3 itemprop="headline"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
            </header>
            <div class="post-content">
                <?php the_excerpt(); ?>
                <a href="<?php the_permalink(); ?>" class="more-link"><?php esc_html_e( 'Read More', 'notio' ); ?></a>
            </div>
            <?php do_action( 'thb_PostMeta' ); ?>
        </div>
    <?php
    endwhile; // End of the loop. ?>
    <div class="small-12 large-3 columns sidebar">
        <?php if ( is_active_sidebar( 'custom-side-bar' ) ) : ?>
            <?php dynamic_sidebar( 'custom-side-bar' ); ?>
        <?php endif; ?>
    </div>
</div>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...