
-
AuthorPosts
-
October 1, 2025 at 6:35 am #1489714
Hi, some time ago I asked you how to make the related entries in Masonry not use an H3 tag but a “p” tag instead. (You suggested trying this in my child-theme functions.php:
function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array() ){
if( $context == ‘avia_masonry’ ){
$args[‘heading’] = ‘h4’;
}
return $args;
}
add_filter( ‘avf_customize_heading_settings’, ‘my_avf_customize_heading_settings’, 10, 3 );…and that I could replace h4 with span or p if I preferred).
Now I would like to do the same for the entries I display as “Artículos relacionados”. You can see an example at the bottom of this page:
👉 https://faceclinic.es/cirugia-plastica/facial/blefaroplastia/Could you please let me know how to achieve this and what code I should use? Thanks a lot.
October 2, 2025 at 4:13 am #1489736Hey carmen,
Try this filter:function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array() ) { if( $context == 'avia_post_slider' ) { $args['heading'] = 'h4'; } return $args; } add_filter( 'avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3 );
Best regards,
MikeOctober 2, 2025 at 9:26 am #1489745try Mikes Solution – did not know why the content-slider.php does not rule that – see next post
October 2, 2025 at 9:42 am #1489746the content-slider element is something different than that what you are using on your page – you are using the post-slider element – so try mikes code
in The DOM these elements got the classes : avia-content-sllider – so that is my mistake that i believe that you are using th content-slider element.October 2, 2025 at 11:15 am #1489752Hi,
@Guenni007 I also believe that carmentvaalba is using the post slider.
@carmentvaalba you may get an error if you add two filters with my_avf_customize_heading_settings, so try this for the masonry:function masonry_customize_heading_settings( array $args, $context, array $extra_args = array() ){ if( $context == 'avia_masonry' ){ $args['heading'] = 'h4'; } return $args; } add_filter( 'avf_customize_heading_settings', 'masonry_customize_heading_settings', 10, 3 );
and this for the post slider:
function post_slider_customize_heading_settings( array $args, $context, array $extra_args = array() ) { if( $context == 'avia_post_slider' ) { $args['heading'] = 'h4'; } return $args; } add_filter( 'avf_customize_heading_settings', 'post_slider_customize_heading_settings', 10, 3 );
and if you do ever need one for the content slider, you could try:
function content_slider_customize_heading_settings( array $args, $context, array $extra_args = array() ) { if( $context == 'avia_content_slider' ) { $args['heading'] = 'h4'; } return $args; } add_filter( 'avf_customize_heading_settings', 'content_slider_customize_heading_settings', 10, 3 );
and for the icon box:
function icon_box_customize_heading_settings( array $args, $context, array $extra_args = array() ) { if( $context == 'avia_sc_icon_box' ) { $args['heading'] = 'h4'; } return $args; } add_filter( 'avf_customize_heading_settings', 'icon_box_customize_heading_settings', 10, 3 );
Best regards,
MikeOctober 2, 2025 at 3:07 pm #1489770Since my backend is in German, I always have to double-check how the elements are named in English.
October 2, 2025 at 8:45 pm #1489781 -
AuthorPosts
- You must be logged in to reply to this topic.