Wordpress WP_查询分类术语再添加一篇文章

Wordpress WP_查询分类术语再添加一篇文章,wordpress,custom-taxonomy,custom-wordpress-pages,Wordpress,Custom Taxonomy,Custom Wordpress Pages,我正在使用分类法页面顺序,使用不同的WP\u查询。在每个循环的最后添加一个“post”,其中包含页面标题和来自前一篇文章的信息。很奇怪的事情 我找不到关于这个的任何东西(我也不知道如何搜索这个)。谢谢你抽出时间。我的文件是: <?php $the_query = new WP_Query( array( 'post_type' => 'intervencion', 'tax_query' => array( array

我正在使用分类法页面顺序,使用不同的WP\u查询。在每个循环的最后添加一个“post”,其中包含页面标题和来自前一篇文章的信息。很奇怪的事情

我找不到关于这个的任何东西(我也不知道如何搜索这个)。谢谢你抽出时间。我的文件是:

      <?php
  $the_query = new WP_Query( array(
      'post_type' => 'intervencion',
      'tax_query' => array(
          array (
              'taxonomy' => 'especialidad',
              'field' => 'slug',
              'terms' => 'bariatrica_ok',
          )
      ),
  ) );

  while ( $the_query->have_posts() ) : $the_query->the_post();?>
          <?php $meta = get_post_meta(get_the_ID()); ?>
      <div class="col-lg-3 col-md-4 col-sm-6">
          <div class="ficha">
              <?php if ( has_post_thumbnail() ) { ?>
                  <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumb_intervenciones', array('class' => 'img-responsive')); ?></a>
              <?php } ?>
              <h2><?php echo get_the_title(); ?></h2>
              <p class="condiciones">Todo</br>incluido por:</p>
              <p class="precio"><?php echo $meta['intervenciones_precio_intervencion'][0]; ?> &euro;</p>
              <a class="ficha-btn" href="<?php the_permalink()?>">Solicitar cita</a>
          </div>
      </div>
<?php
  endwhile;
  wp_reset_postdata();
  ?>

待办事项包括:

&euro

列表底部的结果是: