带有 CPT 的 Flexslider 不工作 (Wordpress)

Flexslider with CPT is not working (Wordpress)

我添加了 Flexslider,站点 http://test06.menchasha.ru/。 Header 中的代码:

<script type="text/javascript"> (function($) {
        jQuery(window).load(function() {
         jQuery('#featured-image-slider .flexslider').flexslider({
               animation: 'slide',
                slideshowSpeed: 9000,
                animationSpeed: 900,
                pauseOnAction: true,
                pauseOnHover: true,
                controlNav: false,
                directionNav: true, 
                controlsContainer: "#featured-image-slider",
        });
   })
})(jQuery)</script>

Front-Page中的代码:

<section id="featured-image-slider">
      <div class="flexslider">
        <ul class="slides">
        <?php query_posts(array('post_type' => 'Sliders','orderby' => 'rand')); if(have_posts()) : while(have_posts()) : the_post();?>
            <li class="slide">
            <?php the_title(); ?>
            <?php the_excerpt(); ?>
            <?php the_post_thumbnail(); ?>
           </li>
           <?php endwhile; endif; wp_reset_query(); ?>
           </ul>
    </div>
</section>

正确包含脚本和样式。 但是滑块没有显示我的自定义 Post 类型。 你能帮忙吗?

谢谢!

有关详细信息,请阅读问题中的评论:

错误来自于在查询中使用 post_types 名称。

应该是注册的post类型标识符。

意思是

'post_type' => 'Sliders'

应该是

'post_type' => 'acme_product'