Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1169158

    Hi guys,
    I was wondering how it is possible to have a H1 title on tag/category/author pages.

    Thanks and happy new year everyone :-)
    Marco

    #1169222

    Hey marcoabis81,

    Happy new year!

    Yes, this is possible. You can use the avf_customize_heading_settings to adjust the default markup of the headings. Usage example can be found in the following thread.

    // https://kriesi.at/support/topic/timeline-milestone-h2-and-h3-tags-how-can-i-delete/#post-1098165

    Best regards,
    Ismael

    #1180559

    to use the filter we need to have the

    on a avia_sc_content_slider it could be done this way:

    function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array() )
    {	
    	if( 'avia_sc_content_slider' == $context && is_array( $extra_args ) && in_array( 'slider_entry', $extra_args ) )
    	{
    		$args['heading'] = 'h2';						
    		$args['extra_class'] = 'custom-class';		
    	}
    	return $args;
    }
    add_filter( 'avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3 );

    Or:
    with extra_args : slider_title

    ___________

    but how to handle it on : avia_sc_postslider
    the extra_args are a bit different there

    $default_heading = 'h3';
    $args = array(
    			'heading'		=> $default_heading,
    			'extra_class'	=> ''
    		);
    
    $extra_args = array( $this, $index, $entry );

    And how to use it globaly with no custom-class ?

    #1180646

    So for blog.php the postslider give his part in it so context is : avia_sc_postslider
    but this does not have effect:

    function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array() ){
    	if( $context == 'avia_sc_postslider' ){
    		$args['heading'] = 'h2';			//	change heading from h3 to h1
    		$args['extra_class'] = 'custom-class';		//	add an extra class for styling
    	}
      return $args;
    }
    add_filter( 'avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3 );
    #1180927

    Hi,

    Thank you for the examples and the detailed descriptions. :)

    Best regards,
    Ismael

    #1181588

    Yes Ismael – but the thing is that i do not know how to use the filter on that case.
    First – it is unclear what context to use – second how to ? The code above does not work!
    So have a look please – or ask Günter how to get it the right way here.
    Thanks

    #1182677

    Hi,

    Sorry about that. I didn’t notice your end note. The __CLASS__ name or $context should be “avia_post_slider” instead of “avia_sc_postslider”.

    if( $context == 'avia_post_slider' ){
    

    Best regards,
    Ismael

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