Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress 字压循环滑块_Wordpress_Slider - Fatal编程技术网

Wordpress 字压循环滑块

Wordpress 字压循环滑块,wordpress,slider,Wordpress,Slider,你好,我一直在为我的足球博客设计一个特别的主题——运动引导主题。我试着循环主题的滑块,但尽管我做了很多努力,主题还是散开了。我真的很想得到任何帮助,谢谢。下面是我一直在编写的php代码 <div class="col-md-6"> <div class="feature_news_carousel"> <div id="featured-news

你好,我一直在为我的足球博客设计一个特别的主题——运动引导主题。我试着循环主题的滑块,但尽管我做了很多努力,主题还是散开了。我真的很想得到任何帮助,谢谢。下面是我一直在编写的php代码

        <div class="col-md-6">
            <div class="feature_news_carousel">
                <div id="featured-news-carousal" class="carousel slide" data-ride="carousel">
                    <!-- Wrapper for slides -->
                    <div class="carousel-inner" role="listbox">
                    
                    <?php
                 $args = array(
            'category_name' => 'latest',
            'posts_per_page'=> 4
            );
            $uk_soccer = new WP_Query($args);
       
            if ( $uk_soccer->have_posts() ) : while ( $uk_soccer->have_posts() ): $uk_soccer->the_post();
        
                ?>   
                        <div class="item active feature_news_item">
                        <div class="item_wrapper">
                                <div class="item_img">
    <img class="img-responsive" src="<?php the_post_thumbnail_url(); ?>" alt="<?php the_title(); ?>">
                                </div> <!--item_img-->
                                <div class="item_title_date">
                                    <div class="news_item_title">
                                        <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                                    </div>
                                    <div class="item_meta"><?php echo get_the_date('M, j Y'); ?> at <?php the_time(); ?>,</a> by:<a href="#"><?php echo get_author_name(); ?></a></div>
                                </div> <!--item_title_date-->
                            </div>  <!--item_wrapper-->
                            <div class="item_content"><?php echo excerpt(15); ?></div>
                            </div><!--feature_news_item-->
                        <?php
    endwhile;
    endif;
    wp_reset_postdata();
    
    ?>
                        <!-- Left and right controls -->
                        <div class="control-wrapper">
                            <a class="left carousel-control" href="#featured-news-carousal" role="button" data-slide="prev">
                                <i class="fa fa-chevron-left" aria-hidden="true"></i>
                            </a>
                            <a class="right carousel-control" href="#featured-news-carousal" role="button" data-slide="next">
                                <i class="fa fa-chevron-right" aria-hidden="true"></i>
                            </a>
                        </div>


                        </div><!--carousel-inner-->
                        </div><!--carousel-->
                

                

                
            </div><!--feature_news_carousel-->
                    
            
                        </div><!--col-md-6-->
        

“alt=”“>
在,通过:

输入此代码,以便滑块工作

<div class="col-md-6">
            <div class="feature_news_carousel">
                <div id="featured-news-carousal" class="carousel slide" data-ride="carousel">
                    <!-- Wrapper for slides -->
                    <div class="carousel-inner" role="listbox">
                    
                    <?php
                 $args = array(
            'category_name' => 'latest',
            'posts_per_page'=> 4
            );
            $uk_soccer = new WP_Query($args);
       
            if ( $uk_soccer->have_posts() ) : 
$index = 0;
while ( $uk_soccer->have_posts() ): $uk_soccer->the_post();
        
                ?>   
                        <div class="<?php echo ($index == 0) ? 'active' : ''; ?>feature_news_item">
                        <div class="item_wrapper">
                                <div class="item_img">
    <img class="img-responsive" src="<?php the_post_thumbnail_url(); ?>" alt="<?php the_title(); ?>">
                                </div> <!--item_img-->
                                <div class="item_title_date">
                                    <div class="news_item_title">
                                        <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                                    </div>
                                    <div class="item_meta"><?php echo get_the_date('M, j Y'); ?> at <?php the_time(); ?>,</a> by:<a href="#"><?php echo get_author_name(); ?></a></div>
                                </div> <!--item_title_date-->
                            </div>  <!--item_wrapper-->
                            <div class="item_content"><?php echo excerpt(15); ?></div>
                            </div><!--feature_news_item-->
                        <?php
$index++;
    endwhile;
    endif;
    wp_reset_postdata();
    
    ?>
                        <!-- Left and right controls -->
                        <div class="control-wrapper">
                            <a class="left carousel-control" href="#featured-news-carousal" role="button" data-slide="prev">
                                <i class="fa fa-chevron-left" aria-hidden="true"></i>
                            </a>
                            <a class="right carousel-control" href="#featured-news-carousal" role="button" data-slide="next">
                                <i class="fa fa-chevron-right" aria-hidden="true"></i>
                            </a>
                        </div>


                        </div><!--carousel-inner-->
                        </div><!--carousel-->
                

                

                
            </div><!--feature_news_carousel-->
                    
            
                        </div><!--col-md-6-->
        

定义“分散”。仅仅用一些PHP/HTML代码很难说出你的意思。你有一个人们可以看到问题的实时URL吗?或者,共享一个链接,这样人们就可以帮助你调试这个问题。项目的链接是分散的,从这个意义上说,它不是滑动滑块,而是向下排列帖子。谢谢。