Adding a title="" in h2 in div class "flex-caption"

Hello,

As slider titles are dynamically created, meaning it takes the same class and I am trying to remove the title from one slider and to show it in other the one of solutions I found is using the [title~=“titletag”] css and then set it as display:none !important;

How can I make the flexslider fetch titles from Pages or Posts so I can use this pseudo selector?
Also, if you have a better way of doing this, please let me know.

This is pretty urgent. :slight_smile:

Anyone?

Sorry for bumping.

Hi @denir,

Extremely sorry for the delay here.

The slider slide link tags don’t have title attribute so the title attribute CSS selector that you have shared won’t work.

Are you talking about the slider title as shown in the attached screenshot and wants to hide it for some slides and not for other slides?

If this is the case then please share your site URL where you are displaying the slider and tell me for which slides you want to hide it so that i can help you specifically to hide it?

Kind Regards,
Movin

Hi,

It’s okay, thanks for responding.

I already fixed this using jQuery.

Here is my code in case someone needs it:

<script>
$( “h2:contains(‘About’)” ).css( “display”, “none” );
</script>

Hi @denir,

Awesome great to see you got that fixed.

I hope the solution you have shared will help others who want to achieve the same.

Just want to let you know that your code will hide all About word on your site that is displayed in the h2 tag so to avoid this and to only change the About word displayed in the caption of flexslider you should use the selector “.flex-caption h2” as displayed below.

<script>
$( “.flex-caption h2:contains(‘About’)” ).css( “display”, “none” );
</script>

Cheers,
Movin