Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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.

    #1489736

    Hey 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,
    Mike

    #1489745

    try Mikes Solution – did not know why the content-slider.php does not rule that – see next post

    #1489746

    the 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.

    #1489752

    Hi,

    @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,
    Mike

    #1489770

    Since my backend is in German, I always have to double-check how the elements are named in English.

    #1489781

    Hi,
    Makes sense 

    Best regards,
    Mike

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.