-
AuthorPosts
-
July 2, 2024 at 10:23 am #1460925
I need to change the heading tag in the fullwidth slider from h2 to h1. I found this script in another post:
I tried this function but it does not alter anything.
Any idea on what to change in order to make it work
Regards
NinaJuly 2, 2024 at 11:56 am #1460962Hey Advantage09,
You can set your preferred tag by clicking into each slide, then go to Advanced->Heading tag.
Best regards,
RikardJuly 6, 2024 at 11:00 pm #1461508or if you like to change that globally ( those which are set as Rikard said are not influenced by the snippet – only those headings are changed where the setting is default.)
put this to your child-theme function.php:function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array()){ if( 'avia_slideshow' == $context ){ // get class of slideshow $slider_class = get_class( $extra_args[2] ); if( in_array( $slider_class, [ 'avia_sc_slider_full' ])){ $index = $extra_args [1]; if( '' == $attr['heading_tag'] && 0 == $index ){ $args['heading'] = 'h1'; } } } return $args; } add_filter( 'avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3 );see: https://webers-testseite.de/slider-caption/
PS:
avia_sc_slider_full is the fullwidth-slider
avia_sc_slider_fullscreen is the fullscreen slider
avia_sc_slider is easy sliderPPS: this is the better method than mine from https://kriesi.at/support/topic/changing-the-caption-title-on-fullwidth-easy-slider-to-h1/#post-998732
This controls the generation of these headings – the jQuery script only replaces them after the creation process.July 7, 2024 at 11:21 am #1461528 -
AuthorPosts
- You must be logged in to reply to this topic.
