请浏览网站http://firehouse.studio/2MomsF/
目前正在进行中。您可以看到标题滑块使用" Cookie,Cakes和Casseroles"进行控制。类似的类别列表在标题下面由另一组导航处理,即"饼干蛋糕和砂锅菜#34;。
如果您能够帮助删除滑块下方的菜单,并且滑块和产品从“34,饼干,蛋糕和砂锅菜单的滑块导航”中更改,我将不胜感激。
感谢您的帮助。
Header Slider是使用Owl Carousel 2制作的。因为它有很多代码我只是要粘贴在代码下面,我可以用它来标题每张幻灯片并使其在点击时工作。
var main = $( '.main-slider' ).owlCarousel({
loop:true,
margin:0,
dots:true,
nav: true,
navText: ['',''],
items:1,
navSpeed: 500,
dotsSpeed: 500,
autoplay: false,
autoplaySpeed: 5000,
autoplayTimeout: 10000,
autoplayHoverPause: false
});
setTimeout( function(){
main.css('opacity',1);
}, 100 );
var dotsCount = $('.main-slider .owl-dot').length;
var dotsW = 78*dotsCount;
var i = 1;
/*Maddy Wrote this Code - 12/09/2017*/
var slidercaption=[];
slidercaption[1]="Cookies";
slidercaption[2]="Cakes";
slidercaption[3]="Casseroles";
/*Written Code Ends*/
$( '.main-slider .owl-dot' ).each( function(){
//$( this ).text( '0'+i++ );
$( this ).text( slidercaption[i++] );
//$( this ).text( 'Cookies' + ' ' + 'Cakes' + ' ' + 'Casseroles' + ' ' );
}
根据类别显示产品的代码如下所示:
{
<div class="cml-row">
<div class="product-list">
<div class="product-list__filter">
<span class="active product-list__tab" data-filter="new"><?php echo esc_html__('Cookies', 'chameleon'); ?></span>
<span class="product-list__tab" data-filter="popular"><?php echo esc_html__('Cakes', 'chameleon'); ?></span>
<span class="product-list__tab" data-filter="sale"><?php echo esc_html__('Casseroles', 'chameleon'); ?></span>
</div>
<div class="product-list__items">
<div class="product-list__wrap new active">
<?php get_template_part( 'templates/popular', 'cookies' );?>
</div>
<div class="product-list__wrap popular">
<?php get_template_part( 'templates/popular', 'cakes' );?>
</div>
<div class="product-list__wrap sale">
<?php get_template_part( 'templates/popular', 'casseroles' );?>
</div>
</div>
</div>
</div>