Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1409711

    Hi, I found an old code you suggested in the past on how to change the caption from H2 to H1 but it broke the caption design (instead of white font with gray frame it became black font with no frame).

    Any idea? It’s pretty crucial for us because we use the caption in the slideshow as the main title of the page, and by all SEO suggestions, it needs to be a H1 tag.

    Thank you.

    • This topic was modified 1 year, 4 months ago by 0_o.
    • This topic was modified 1 year, 4 months ago by 0_o.
    #1409717

    Hey!

    Thank you for the inquiry.

    Did you adjust the options in the Advanced > Heading Tag > Heading Tag (Theme Default is h2) settings? We may need to inspect the site in order to understand the issue better. Please provide the site details in the private field.

    Regards,
    Ismael

    #1409719

    Not sure what setting I should look for.
    Are you referring to the setting block Theme Options > Advanced Styling > All Headings (H1-H6)? If so, what exactly do I need to change there?

    Thanks!

    #1409721

    Nevermind I see what you’re talking about. There’s a setting in the image page inside the fullwidth slider. Thank you!

    #1409722

    Hey!

    Great! Glad to know that you’ve found the Heading Tag settings. Let us know if this helps.

    Best regards,
    Ismael

    #1409724

    Yes technically it works but I need to go thru dozens of pages and change it manually, if there was an easy way to edit the default from H2 to H1 that could have been amazing.

    Also if there was an option to edit the default caption title font size and caption content font size on mobile view that could save me a bunch of work.

    • This reply was modified 1 year, 4 months ago by 0_o.
    #1409727

    the change on color of the h1 had to be set in quick css. But with that filter here the option if framed or not is preserved.

    function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array() ){
      if( $context == 'avia_slideshow' ){
        $args['heading'] = 'h1';             
      }
      return $args;
    }
    add_filter( 'avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3 );

    but i do not see how to differ between fullscreen and fullwidth sliders – the filter is inside the helper: class-avia-slideshow.php
    and f.e. no extra_args are set.

    maybe the filter avf_slideshow_title can be used – but i think it is only to change the content of title .

    #1409730

    This could also be used as a snippet – but from a SEO point of view it would probably be better not to replace an existing H2, but to change the build process to H1.

    function replace_tags_with_tags(){
    ?>
    <script>
      (function($) {       
          function replaceElementTag(targetSelector, newTagString) {
            $(targetSelector).each(function(){
              var newElem = $(newTagString, {html: $(this).html()});
              $.each(this.attributes, function() {
                newElem.attr(this.name, this.value);
              });
              $(this).replaceWith(newElem);
            });
          }
          replaceElementTag('.avia-fullwidth-slider h2.avia-caption-title', '<h1></h1>'); 
      }(jQuery)); 
    </script>
    <?php
    }
    add_action('wp_footer', 'replace_tags_with_tags');
    #1410103

    Hi,
    Glad Guenni007 could help, thank you Guenni007, do you need any further help or shall we close this then?

    Best regards,
    Mike

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