Commit acc5886f by Simone

feature link all per shortcode swiper

parent f3224d00
......@@ -13,7 +13,8 @@ class SwiperController
'spacebetween' => 16,
'centeredslides' => true,
'button_text' => '',
'button_color' => 'white'
'button_color' => 'white',
'link_all' => 'false'
]
];
}
......
......@@ -30,9 +30,10 @@ if (!empty($this->atts['custom_post'])) {
$the_query = new WP_Query($args);
if ($this->atts['gruppo']) {
$term = get_term_by('slug',$this->atts['gruppo'],'swiper_group');
$term = get_term_by('slug', $this->atts['gruppo'], 'swiper_group');
$term_meta = get_option("taxonomy_term_$term->term_id");
$swiper_json = wp_unslash($term_meta["swiper_group_json"]);
}
if ($the_query->have_posts()) : ?>
......@@ -50,7 +51,8 @@ if ($the_query->have_posts()) : ?>
<?php echo $this->atts['button_text'] ?>
</a>
</div>
<?php else : ?>
<?php endif;?>
<?php if ( empty($this->atts['button_text']) || $this->atts['link_all']=='true' ) : ?>
<a class="card__link" href="<?php echo $link; ?>"></a>
<?php endif; ?>
<div class="card__inner">
......@@ -60,11 +62,11 @@ if ($the_query->have_posts()) : ?>
<div class="card_caption">
<?php the_title() ?>
</div>
<?php if( $post_type == 'laniakea_swiper'):?>
<?php if ($post_type == 'laniakea_swiper') : ?>
<div class="card_content">
<?php the_content() ?>
</div>
<?php endif;?>
<?php endif; ?>
</div>
</div>
</div>
......@@ -98,9 +100,9 @@ if ($the_query->have_posts()) : ?>
{
speed: 400,
slidesPerView: 1,
spaceBetween: ".$this->atts['spacebetween'].",
loop: ".$this->atts['loop'].",
initialSlide: ".$this->atts['initialslide']." ,
spaceBetween: " . $this->atts['spacebetween'] . ",
loop: " . $this->atts['loop'] . ",
initialSlide: " . $this->atts['initialslide'] . " ,
centeredSlides: false,
centerInsufficientSlides: false,
scrollbar: {
......
......@@ -863,7 +863,7 @@ main {
.swiper .card .vc_btn3-container {
position: absolute;
z-index: 2;
z-index: 3;
margin: 0;
}
......
......@@ -187,7 +187,7 @@ main {
.swiper .card .vc_btn3-container {
position: absolute;
z-index: 2;
z-index: 3;
margin:0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment