Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1368492

    Dear team,

    when I edit an event (The Events Calendar), I face a strange issue:

    I type a heading H2
    Save and update
    The heading appears as H1 instead of H2.

    Can you please have a look at that?

    Thank you
    Asterios

    #1368535

    Hey Asterios,

    Thank you for the inquiry.

    We may need to access the site in order to inspect the issue. Please provide the login details in the private field, and make sure that the Appearance > Editor panel is accessible.

    Best regards,
    Ismael

    #1368684

    Hello Ismael,

    thank you for the fast reply.

    Best
    Asterios

    #1368713

    Hi,

    Thank you for the info.

    We checked the events page but we are not yet sure what is causing the issue. We tried adding a class name to the h2 element but it still get converted to h1 after updating the page. Is there a staging or development version of the site? Have you tried deactivating the SEO plugins?

    Best regards,
    Ismael

    #1368717

    Hello Ismael,

    thank you for the reply and your effort.
    I just tried and deactivated Rank Math but it didn´t help.

    No, there is no staging environment.

    Best
    Asterios

    #1368946

    Hi,
    Thank for the login, I see in your child theme you have a script to replace H2 tags with H1:

    
    /*H2 to H1*/
    function replace_h2_on_single_events(){
    ?>
    <script>
      (function( $ ) {
    	$(document).ready(function() {       	
    		$('.av-single-event-content h2').replaceWith(function(){
    		   $newTag = $("<h1>", {html: $(this).html()});
    		   $.each(this.attributes, function(i, attribute){
    		        $newTag.attr(attribute.name, attribute.value);
    		  });
    		  return $newTag;
    		})
    	 });
      }(jQuery)); 
    </script>
    <?php
    }
    add_action('wp_footer', 'replace_h2_on_single_events');

    When I disable this script the issue is solved, If you want to use this script please try making it more specific as to which tags to change.

    Best regards,
    Mike

    #1368949

    Dear Mike,

    thank you, that helped a lot.
    The code was added a long time ago when I was not using breadcrumbs and that´s why I needed a H1.
    Thank you for the help provided, issue is solved.

    Best
    Asterios

    #1368951

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Heading issue’ is closed to new replies.