Not complex at all @maudud
There are several different ways you can achieve this, here’s two:
- You could add a switch control to allow users to use the featured images of the individual posts, and also disable background controls in the tabs if this is switcher is turned on.
- You could check if featured image option (from the dynamic tags) has been selected from the background group control (you can access these via
$settings['__dynamic__']
).
The below example modifies the render_thumbnav
which by default shows the post thumbnail for each nav item:
File: /wp-content/plugins/bdthemes-prime-slider-lite/modules/storker/widgets/storker.php
public function render_thumbnav()
{
$settings = $this->get_settings_for_display();
$this->add_render_attribute(
'thumb-item',
[
'class' => 'bdt-item swiper-slide',
'style' => "background-image: url('" . get_the_post_thumbnail_url( get_the_id(), 'full' ) . "');"
]
);
?>
<div <?php
echo $this->get_render_attribute_string( 'thumb-item' ) ;
?>>
<div class="bdt-storker-content">
<h3 class="bdt-storker-title">
<a href="javascript:void(0);"><?php
echo esc_html( get_the_title() ) ;
?></a>
</h3>
</div>
<div class="bdt-storker-arrow">
<a href="<?php
echo esc_url( get_permalink() ) ;
?>">
<i class="eicon-arrow-right"></i>
</a>
</div>
</div>
<?php
}
Anyways, I’ll just extend your Storker
widget to allow for the functionality.
Have a great day