我刚刚将我的客户网站启动到临时URL,因此他们可以在我完成CSS和完成触摸时进行数据输入。但是,当我启动该网站时,我发现其中一部分破裂了,罪魁祸首是定制的滑块。我不明白为什么它会破裂,因为它在我的本地主机上效果很好。
我正在使用一个名为Flickity的PKG,直到现在,它一直很好地对待我。我在网站上使用其他闪光滑块,所以我知道闪光本身并不是问题。我已将滑块的代码下方附加了。
自定义帖子是剧院制作,本来可以根据截止性能日期订购:ending_date [acf]。
<section class="slider-prod">
我们的作品
<div class="gallery js-flickity prod-slider" data-flickity-options='{"imagesLoaded": true, "selectedAttraction": 0.01, "friction": 0.3, "groupCells": 3, "cellAlign": "left", "contain": true, "pageDots": false }'>
<!-- CURRENT PRODUCTION -->
<?php // query posts
$params = array(
'post_type' => 'productions',
'post' => $id,
'posts_per_page' => -1,
'meta_key' => 'ending_date',
'orderby' => 'meta_value',
'order' => 'ASC',
);
$slider_posts = new WP_Query($params);
?>
<?php if ( $slider_posts->have_posts() ) while ( $slider_posts->have_posts() ) : $slider_posts->the_post(); ?>
<?php date_default_timezone_set('America/New_York');
$slider_link = get_permalink();
$starting_date = get_field('starting_date');
$ending_date = get_field('ending_date');
$location = get_field('location');
$prod_link = get_permalink();
$todays_date = date(Ymd);
?>
<?php if (($todays_date<=$ending_date) and ($todays_date>=$starting_date)): ?>
<div class="gallery-cell future-prod">
<a href="<?php echo $slider_link; ?>" class="slider-link">
<?php the_post_thumbnail('hero'); ?>
<div class="content">
<h3>
<?php the_title(); ?>
</h3>
<p>
<?php
$end = date_create_from_format('Ymd',$ending_date);
$start = date_create_from_format('Ymd',$starting_date);
echo "<span class='month'>" . $start->format('F') . "</span>";
echo " ";
echo "<span class='day'>" . $start->format('j') . "</span>";
echo ", ";
echo "<span class='year'>" . $start->format('Y') . "</span>";
echo " - ";
echo "<span class='month'>" . $end->format('F') . "</span>";
echo " ";
echo "<span class='day'>" . $end->format('d') . "</span>";
echo ", ";
echo "<span class='year'>" . $end->format('Y') . "</span>";
echo ", $location";
?>
</p>
<p>
<?php echo wp_trim_words( get_the_content(), 40, '...' ); ?>
</p>
<h4 class="status now-playing">
Now Playing
</h4>
</div>
</a>
</div> <!-- /.gallery-cell.future-pro -->
<?php endif ?>
<?php endwhile; ?>
<!-- FUTURE PRODUCTION -->
<?php // query posts
$params = array(
'post_type' => 'productions',
'post' => $id,
'posts_per_page' => -1,
'meta_key' => 'ending_date',
'orderby' => 'meta_value',
'order' => 'DEC',
);
$slider_posts = new WP_Query($params);
$array_rev = array_reverse($slider_posts->posts);
//reassign the reversed posts array to the $home_shows object
$slider_posts->posts = $array_rev;
?>
<?php if ( $slider_posts->have_posts() ) while ( $slider_posts->have_posts() ) : $slider_posts->the_post(); ?>
<?php date_default_timezone_set('America/New_York');
$slider_link = get_permalink();
$starting_date = get_field('starting_date');
$ending_date = get_field('ending_date');
$location = get_field('location');
$prod_link = get_permalink();
$todays_date = date(Ymd);
?>
<?php if (($todays_date<$ending_date) and ($todays_date<$starting_date)): ?>
<div class="gallery-cell future-prod">
<a href="<?php echo $slider_link; ?>" class="slider-link">
<?php the_post_thumbnail('hero'); ?>
<div class="content">
<h3>
<?php the_title(); ?>
</h3>
<p>
<?php
$end = date_create_from_format('Ymd',$ending_date);
$start = date_create_from_format('Ymd',$starting_date);
echo "<span class='month'>" . $start->format('F') . "</span>";
echo " ";
echo "<span class='day'>" . $start->format('j') . "</span>";
echo ", ";
echo "<span class='year'>" . $start->format('Y') . "</span>";
echo " - ";
echo "<span class='month'>" . $end->format('F') . "</span>";
echo " ";
echo "<span class='day'>" . $end->format('d') . "</span>";
echo ", ";
echo "<span class='year'>" . $end->format('Y') . "</span>";
echo ", $location";
?>
</p>
<p>
<?php echo wp_trim_words( get_the_content(), 40, '...' ); ?>
</p>
<h4 class="status coming-soon">
Coming Soon
</h4>
</div>
</a>
</div> <!-- /.gallery-cell.future-pro -->
<?php endif ?>
<?php endwhile; ?>
<!-- PAST PRODUCTION -->
<?php // query posts
$params = array(
'post_type' => 'productions',
'post' => $id,
'posts_per_page' => -1,
'meta_key' => 'ending_date',
'orderby' => 'meta_value',
'order' => DEC,
);
$slider_posts = new WP_Query($params);
?>
<?php if ( $slider_posts->have_posts() ) while ( $slider_posts->have_posts() ) : $slider_posts->the_post(); ?>
<?php date_default_timezone_set('America/New_York');
$slider_link = get_permalink();
$starting_date = get_field('starting_date');
$ending_date = get_field('ending_date');
$location = get_field('location');
$prod_link = get_permalink();
$todays_date = date(Ymd); ?>
<?php if ($ending_date<$todays_date): ?>
<div class="gallery-cell past-prod">
<a href="<?php echo $slider_link; ?>" class="slider-link">
<?php the_post_thumbnail('hero'); ?>
<div class="content">
<h3>
<?php the_title(); ?>
</h3>
<p>
<?php echo wp_trim_words( get_the_content(), 40, '...' ); ?>
</p>
<h4 class="status coming-soon">
Past Production
</h4>
</div>
</a>
</div> <!-- /.gallery-cell.past-prod -->
<?php endif ?>
<?php endwhile; ?>
<?php $prod_link = get_permalink(11); ?>
<div class="gallery-cell read-more">
<a href="<?php echo $prod_link; ?>" class="slider-news">
<h4 class="slider-news">READ MORE</h4>
</a>
</div> <!-- /.gallery-cell.read-more -->
</div> <!-- /.gallery -->
检查了我的开发工具中的控制台错误后,它会出现以下错误。有什么建议吗?
未介绍的参考:未定义jQuery 在jQuery-Migrate.min.js:2(索引):87未介绍的参考文献:未定义jQuery 在(索引):87
您应该调试错误,使用浏览器的开发人员工具并检查控制台错误,它将显示大家您上传的文件和文件夹可以检查和更新filezilla
或您使用的任何其他FTP客户端的权限