Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #1197794

    Hi,
    In my home page, in the top I have a Slider accordéon with 6 images.
    The title (or legend) of each images appears like H3.
    my SEO partner asks me to remove the H3 at the top of the page, which appear before the H1 on the page
    Is it possible to have the same text design without H3, with quick CSS ?
    Thanks

    #1198562

    Hey ppi37,

    Here is the code you can put in your funtions.php

    
    function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array() )
    {
    
    	if( $context == 'avia_sc_magazine' )
    	{
    		$args['heading'] = 'div';						//	change heading from h3 to div
    		$args['extra_class'] = 'my-magazine-header';		//	add an extra class for styling
    	}
    	return $args;
    }
    
    add_filter( 'avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3 );
    

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #1199121

    Hi Victoria,
    I added your code in the function.php of the enfold child theme,
    but there is always H3 in the accordion slider

    the page code :
    …<h3 class=’aviaccordion-title ‘ itemprop=”headline” >Appareil de levage</h3>…

    Thanks for help

    #1199479

    Hi ppi37,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1199536
    This reply has been marked as private.
    #1200639

    Hi ppi37,

    Sorry, the class was incorrect. Please try to use this code instead:

    
    
    function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array() )
    {
    
    	if( $context == 'avia_sc_slider_accordion' )
    	{
    		$args['heading'] = 'div';						//	change heading from h3 to div
    		$args['extra_class'] = 'my-accordion-header';		//	add an extra class for styling
    	}
    	return $args;
    }
    
    add_filter( 'avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3 );
    

    Best regards,
    Victoria

    #1201171

    Hi Victoria,
    No change.
    Here is the code before and after the new functiun you give me :
    <div class=’aviaccordion-preview-title-pos’>
    <div class=’aviaccordion-preview-title-wrap’>
    <div class=’aviaccordion-preview-title’>
    <h3 class=’aviaccordion-title ‘ itemprop=”headline” >Appareil de levage</h3>
    </div></div></div>
    Thanks for help

    #1202501

    Hi ppi37,

    This is fixed now, I have replaced this part of Victoria’s code:

    if( $context == 'avia_sc_slider_accordion' )

    with:

    if( $context == 'aviaccordion' )

    Let us know if you need further assistance.

    Best regards,
    Nikko

    #1202645

    Hi Nikko and Victoria,
    it seems to work perfectly !
    Thanks a lot

    #1202900

    Hi ppi37,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1202901

    Hi ppi37,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #1259342

    Hi, I have the same problem with a iconbox….
    where is the function.php?
    thanks

    • This reply was modified 4 years, 1 month ago by mtrebbi.
    #1259375

    Hi mtrebbi,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #1259506

    http://www.udsa.it
    thanks
    Sara

    #1259518

    @Nikko
    https://kriesi.at/support/topic/how-to-remove-h3-in-slider-accordeon/#post-1202501

    this was new to my – and a look to source code is right – the filter ( avf_customize_heading_settings ) is indeed part of this on line 875:

    if ( ! class_exists( 'aviaccordion' ) ) 
    

    if i use the filter i always took as victoria intends to do the context from the beginning:

    if ( ! class_exists( 'avia_sc_slider_accordion' ) )
    

    it seems to be a specific thing for accordion slider !


    @mtrebbi
    the iconbox has on top of the alb source code:

    if ( ! class_exists( 'avia_sc_icon_box' ) )
    

    so context of the filter is : avia_sc_icon_box
    only the title is set with conjuction to that filter – so this will be enough:

    function my_heading_settings_for_iconbox( array $args, $context, array $extra_args = array() ) {
      if( $context == 'avia_sc_icon_box') {
        $args['heading'] = 'h1';            
        $args['extra_class'] = 'my-iconbox';  
      } 
      return $args;
    }
    add_filter( 'avf_customize_heading_settings', 'my_heading_settings_for_iconbox', 10, 3 );

    the extra_class you can set by yourself – it is only for additonal Styling Options.

    #1259521

    Just for info: some ALB Elements got extra-args for that filter – so you can influence f.e. on timeline.php the date and the title headings
    Date is on default : h2 – and the title is h4
    if you want to influence those ALB Elements with extra args you had to do following:

    function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array() ){
      //so here comes the extra_arg date with that filter 
      if( $context == 'avia_sc_timeline' && is_array( $extra_args ) && in_array( 'date', $extra_args ) ) {
        $args['heading'] = 'h3';            
        $args['extra_class'] = 'my-timeline-date-class';   
      }
      //so here comes the extra_arg title with that filter
      if( $context == 'avia_sc_timeline' && is_array( $extra_args ) && in_array( 'title', $extra_args ) ) {
        $args['heading'] = 'h1';            
        $args['extra_class'] = 'my-timeline-title-class';   
      } 
      return $args;
    }
    add_filter( 'avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3 );
    #1259560

    I’m a beginner and I can’t do this …. why isn’t the possibility to choose the type of tag integrated into the tool?
    Right now, I have a page with 10 h2 and 10 h4 and that’s not good …

    #1259610

    yes that is the normal way.

    but if you had to change it on many pages / post all headings at once this will be the best and fastest way to do it.

    #1259633

    I don’t have Heading section….. I have only Link Setting and developer settings….
    I have enfold 4.7.6.1 ….

    #1259705

    if you open the icon-box Element you do not have 3 General Tabs on top ( see screenshot above )
    Content, Styling and Advanced !

    on default the option is not activated ( “Hide template builder developer options” ) – see dashboard – Enfold – Layout Builder:
    https://kriesi.at/documentation/enfold/intro-to-layout-builder/#developer-options

    #1260055

    I’ve update Enfold…now is 4.7.6.4
    I’ve activated “Hide template builder developer options”
    but my icon-box Element is the same….in the Advanced tab there is only link setting…

    #1260084

    Hi,


    @mtrebbi
    : Thank you for the update. Please open a new thread and provide an admin account for the site in the private field so that we could check the issue. We will close this one for now.

    Best regards,
    Ismael

Viewing 22 posts - 1 through 22 (of 22 total)
  • The topic ‘How to remove H3 in Slider accordeon’ is closed to new replies.