Tagged: breadcrumbs, H1, transparent menu
-
AuthorPosts
-
May 15, 2018 at 6:33 pm #957167
Hi,
I’d like to add both breadcrumbs and H1 title, but they are not been shown when selected the transparent menu.
Is there some tip or solution to add H1 & breadcrumbs functionality to any page with transparent menu?
Many thanks.
DavidMay 17, 2018 at 1:08 pm #958133Hey seomar,
Please try the solutions found hereBest regards,
MikeJuly 20, 2018 at 8:04 am #987720Hi Mike,
I have a little bit different issue and need your help on H1 too.When I enabled breadcrumbs and I have one H1 and that’s great for SEO. However, at some landing pages and homepage I do not want to display breadcrumbs. I will use a full-width easy slider with caption title. And caption title is H2.
I need to create a H1 to those pages.
– If I make a headline below that easy slider (the slider with H2 captio title) and make it H1, the order from H1 to H6 has been disordered. As far as I learnt the H1 should be before H2 so Google search engine will not get confused on the content.
– If I change that caption tittle to H1 then the rest of the web pages will face duplication in H1, which also confuses Google search engine too.So please help how can I make H1 in this situation. You can have a look at the homepage: https://mekongtrails.com/
Thanks for your help,
HoangJuly 20, 2018 at 12:38 pm #987781Hi,
To replace the h2 tag in your slider with h1, try adding this code to the end of your functions.php file in Appearance > Editor:function slider_h2_to_h1(){ ?> <script> jQuery(window).load(function(){ var el = document.querySelector('.avia-caption-title'); el.outerHTML = '<h1 class="avia-caption-title ">' + el.innerHTML + '</h1>'; }); </script> <?php } add_action('wp_footer', 'slider_h2_to_h1');
then add this code in the General Styling > Quick CSS field to style your new h1:
.avia-caption-title { color: #fff !important; font-size: 50px !important; }
please adjust to suit.
Best regards,
MikeJuly 23, 2018 at 10:08 am #988627Thank you very much Mike,
This is great to change from H2 to H1. However, if I apply this code, I will change the H2 to H1 at sliders there will be problem for SEO. There are several pages (especially at landing pages, to urge for action to purchase) we make many sliders. If we add the codes, there will be many duplication of H1 (one page only allows one H1). This is serious for SEO and make the web to be ignored by Google.
Is there any way we can turn H2 to H1 at that very page only, not the whole web?
Thanks,
HoangJuly 24, 2018 at 4:35 am #989016Hi,
Please use this function instead, it will only work on your homepage:function slider_h2_to_h1(){ if ( is_page('734') ) { ?> <script> jQuery(window).load(function(){ var el = document.querySelector('.avia-caption-title'); el.outerHTML = '<h1 class="avia-caption-title ">' + el.innerHTML + '</h1>'; }); </script> <?php } } add_action('wp_footer', 'slider_h2_to_h1');
Best regards,
MikeJuly 24, 2018 at 7:33 pm #989316Thanks Mike so much,
I have two home age, one is in English one is in German. The English one is 734 and the German one is 13401. I also have some other landing pages which are not front page but also need the same change. Should I adjust like this?
function slider_h2_to_h1(){
if ( is_page(‘734, 13401, 11577’) ) { ?>
<script>
jQuery(window).load(function(){
var el = document.querySelector(‘.avia-caption-title’);
el.outerHTML = ‘<h1 class=”avia-caption-title “>’ + el.innerHTML + ‘</h1>’;
});</script>
<?php }
}
add_action(‘wp_footer’, ‘slider_h2_to_h1’);Thanks so much Mike. You help is excellent.
HoangJuly 25, 2018 at 3:44 am #989465Hi,
As long as they are all pages you can use this for the second line:if ( is_page( array( 17, 19, 1, 11 ) ) ) { ?>
adjust to suit.
Best regards,
MikeJuly 25, 2018 at 11:51 am #989638Thanks Mike, it works very well. Thanks for your great support.
HoangJuly 25, 2018 at 1:16 pm #989659Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘transparent menu’ is closed to new replies.