Hello guys, just need help, is there a way we can add individual class on content slider slide? and add an option were we can hide slide. For example, I have 5 slides on a content slider each slide has a unique design, I want to add a class on the 4 slide since 1 slide is default styling. And now i want only 3 slide to show, the 2 slide will be shown later. Is that possible?
:nth-child is the best option for this current development, for some reason client will be changing the slide, moving up and down, and they are asking to hide a specific slide as well. Hoping that makes sense.
Yes, :nth-child is often a weak option with dynamic contents.
I thought of another option which would require a slider module with a custom layout feature like PowerPack Content Grid in carousel mode.
In the custom layout, you could add a wrapper around your post data and a dynamic class on this wrapper, based on a post’s custom field.
This way, you could target the proper posts.
Something like that in the Content Grid module’s custom layout:
<div class="[wpbb post:custom_field key='my-class']">
here the post data
</div>
Yes, if PP custom layout works without Themer (and i don’t see why it wouldn’t), it might be possible to dynamically insert the class with a (free) plugin like Custom Content Shortcode:
<div class="[field my-class]">
here the post data
</div>
But, hmm, you will also have to insert the post data in the custom layout with CCS instead of Themer shortcodes.
Which is possible too.
I wanted to be sure and have just tested: sorry to tell you that PowerPack custom layout doesn’t work without Beaver Themer (nor BB custom layout in Posts module…).
It seems to be a feature powered by Themer, so, not a chance to achieve this without Themer…
Yes, it’s possible to make it by hand with CCS, Slick Slider and some CSS.
See here: https://wpdemo2.avanti.fr/fr/brouillons-test/test-page-13/
A custom layout, no BB Posts slider nor BB 3rd party addon, no Themer.
In the custom layout, one can grab the post custom field and add it as a custom class to the post.