我正在尝试使用猫头鹰旋转木马作为自定义WordPress视觉作曲家元素来显示帖子,但它似乎只是将特色图像显示为轮播项目,然后它在旋转木马下面添加了跨度。
为什么跨度没有包含在猫头鹰旋转木马项目中?
// Blog Carousel
function blogcarousel_func( $atts ) {
ob_start();
extract( shortcode_atts( array(
'nanook_cat_name' => '',
'nanook_products_per_row' => '',
'nanook_nav_style' => ''
), $atts ) );
$postsPerPage = 16;
$cat = $nanook_cat_name;
$args = array(
'post_type' => 'post',
'posts_per_page' => '12'
);
$loop = new WP_Query($args);
$cat_id = $cat;
?>
<div class="blog-carousel owl-carousel <?php echo $nanook_products_per_row; ?>items <?php echo $nanook_nav_style; ?>nav">
<?php
while ($loop->have_posts()) : $loop->the_post();
$output .= '<div>';
$output .= the_post_thumbnail('thumbnail');
$output .= '<span>test</span>';
$output .= '</div>';
endwhile;
wp_reset_postdata();
?>
</div>
<?php
echo $output;
$myvariable = ob_get_clean();
return $myvariable;
}