jquery - 证明通过循环
问题描述
我通过循环创建了推荐信
我希望当用户单击此处(见图)时,它会显示一个推荐并隐藏另一个
我的代码:
<h1>TESTIMONAIL</h1>
<?php $loop = new WP_Query( array(
'post_type' => 'testimonial',
'orderby' => 'post_id',
'order' => 'ASC'
));?>
<?php while( $loop->have_posts() ) : $loop ->the_post(); ?>
<div class="client active">
<div class="row">
<div class="col-sm-6">
<?php if ( has_post_thumbnail () ) {
the_post_thumbnail();
} ?>
</div> <!-- Col -->
<div class="col-sm-6 testi-name">
<h3><?php the_title(); ?></h3>
<h5><?php echo $his_her_job; ?></h5>
</div> <!-- Col -->
<p class="lead"><?php the_content(); ?></p>
<?php endwhile;
wp_reset_query();
?>
</div> <!-- Client -->
</div> <!-- Row -->
<p class="lead"><?php the_content(); ?></p>
<div class="clearfix">
<div class="next float-right">Next Testimonial <i class="fas fa-arrow-right"></i></div>
<div class="next float-left"><i class="fas fa-arrow-left"></i> Previous Testimonial</div>
我如何使用 jquery 来实现这一点?
解决方案
推荐阅读
- react-native - iOS 上的 React Native 0.60+:代码推送、Sentry、React Native Navigation v3 和 AppDelegate.m
- c - STM32 - DWT 循环计数与我的预测不同
- javascript - 在 t-datepicker 中禁用日期
- sql - 如果列中存在空值,如何将 nvarchar 转换为日期时间
- amazon-web-services - How to provide AWS API Gateway Custom Authorizer a Lambda Permission?
- php - 如何在两个日期之间回显几个工作日(仅限周一和周二)?
- c# - Can viewbag handle redirects while still maintaining its value?
- neo4j - Neo4j 配置并行还是串行操作?
- wordpress - 如何使 gvlogic 条件短代码在小部件上工作?
- regex - 查找正则表达式