-
AuthorPosts
-
October 11, 2022 at 8:35 pm #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
AsteriosOctober 12, 2022 at 9:38 am #1368535Hey 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,
IsmaelOctober 13, 2022 at 8:13 am #1368684Hello Ismael,
thank you for the fast reply.
Best
AsteriosOctober 13, 2022 at 10:17 am #1368713Hi,
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,
IsmaelOctober 13, 2022 at 10:38 am #1368717Hello 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
AsteriosOctober 15, 2022 at 1:38 pm #1368946Hi,
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,
MikeOctober 15, 2022 at 2:14 pm #1368949Dear 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
AsteriosOctober 15, 2022 at 2:29 pm #1368951Hi,
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 -
AuthorPosts
- The topic ‘Heading issue’ is closed to new replies.