Support for Envato Buyers Forums Samsara Critical: Removing H1 tag from logo holder

Viewing 13 reply threads
  • Author
    Posts
    • #5403

      Hello,

      I’ve just been made aware that the Samsara theme is using an H1 tag in the logo holder. Google gives the largest weight to the FIRST H1 tag on a website. If this a logo, site’s SEO becomes questionable and therefore will affect ranking.

      Please give me exact instructions on how I remove this H1 tag as there is no point of it being there and will directly affect my rankings.

      Thank you very much in advanced. I look forward to your response.

      Thank you.

      Lucas.

    • #5409

      Hi

      You need to change many files as below, but I suggest you can make a child theme for these changed files.

      1. Edit header.php, find the following code

      <h1 id="logo"><a href="<?php echo home_url();?>" title="<?php bloginfo('title');?>"></a></h1>

      Change to

      <div id="logo"><a href="<?php echo home_url();?>" title="<?php bloginfo('title');?>"></a></div>

      2. Find the following CSS in css/layout.css

      h1#logo a {
          position:absolute;
      	display: block;
      	color: #fff;
      	width: 200px;
      	height: 60px;
      	margin: 5px 0 0 30px;
      	float: left;
      	background-size: 100% auto;
      	background: url(../images/logo.png) no-repeat;
      	font: normal 40px 'loveloblack', cursive;
      	-webkit-transition: margin-top .5s ease;
      	-moz-transition: margin-top .5s ease;
      	-ms-transition: margin-top .5s ease;
      	-o-transition: margin-top .5s ease;
      	transition: margin-top .5s ease;
      }

      Change to

      #logo a {
          position:absolute;
      	display: block;
      	color: #fff;
      	width: 200px;
      	height: 60px;
      	margin: 5px 0 0 30px;
      	float: left;
      	background-size: 100% auto;
      	background: url(../images/logo.png) no-repeat;
      	font: normal 40px 'loveloblack', cursive;
      	-webkit-transition: margin-top .5s ease;
      	-moz-transition: margin-top .5s ease;
      	-ms-transition: margin-top .5s ease;
      	-o-transition: margin-top .5s ease;
      	transition: margin-top .5s ease;
      }

      3. Find the following javascript code in “js/jquery.samsara.js”

      var logo = $('h1#logo a');

      Change to

      var logo = $('#logo a');

      4. Click Ctrl+F to Find the h1#logo in functions/admin-functions.php, change all h1#logo to #logo

      Please note, if you change these files in parent theme folder, you will not able to upgrade the theme smoothly and have to move all the changes to the new version again.

      Thanks

    • #5415

      Hi Badjohnny,

      Thanks very much for that. That all make sense. Do you foresee doing these changes in future updates? From an SEO perspective it’s quite important for the first H1 tag to me keywords relevant to rankings.

      Can I confirm that if I don’t create a child theme, when I update, these changes will be over written and I will have to do them again? I would prefer making these changes after each update rather than making a child site.

      Thanks.

    • #5420

      Hi

      I want, but I can’t make those changes, because many buyers has been already customized their theme, if I change all H1 to DIV, they will have to rework.
      Yes, all changes will be over written if you changed the core files, so the best way is create your own child theme for SEO.

      Thanks

    • #6826

      Hi Johnny,

      I finally got around to this and it hasn’t quite worked.

      I copied header.php, layout.css, jquery.samsara.js, admin-functions.php files and mirrored their directory under the child theme folder and edited them exactly as you wrote above however the logo isn’t showing at all now. See here: http://fullframeproductions.com.au

      I also changed:

      .nav_shrink h1#logo a{
      margin-top:-5px;

      to

      .nav_shrink #logo a{
      margin-top:-5px;

      In the hope that that would fix it but nothing changed. Here are my files incase you need them:

      https://www.dropbox.com/sh/g0u337evfohsvdl/AAB5RRlChkA2TG4as30udn39a?dl=0

      The menu is now no longer responsive too. It just disappears when you shrink the window or access on a phone. Also the blog post slider isn’t quite right either … it shows a bit of the 4th post when it should only be showing three at the same time. Take a look, that’s on my homepage.

      I’s also like to add an alt= tag for the logo too. How do I do this?

      Thanks for your help in advanced, Johnny!!!

      Ill send WP access just in case you need it.

      Lucas.

    • #6827
      This reply has been marked as private.
    • #6828

      I will update H1 in the new version, OK?
      It’s hard to find the reason in your custom code, and php functions and js can’t not directly copy to the child theme.
      User should use add_filter to rewrite the php function and define the new js to override the old js function, but not copy them directly.

      Just please leave me your email, I will send you the modified version.

      Thanks

    • #6829
      This reply has been marked as private.
    • #6831

      Hi

      Now the new version of the theme is available to download on themeforest. 🙂

      Thanks!

    • #6840

      Thanks Johnny!

      Much appreciated. This means I don’t have to have a child theme!

      I noticed when I installed this version, my logo was a bit off:

      https://www.dropbox.com/s/mo268azsr2b8v5m/Screenshot%202014-11-26%2013.03.20.png?dl=0

      I increased the custom logo height in the settings to 75px (even though the picture itself is only 65px) and it fixed it… just.

      https://www.dropbox.com/s/37pojl5i33k2w1x/Screenshot%202014-11-26%2013.03.37.png?dl=0

      It’s still a bit too tight, I’d like a bit more room at the bottom of the logo. What can I do?

      I’ve also noticed that firefox isn’t displaying the logo correctly.

      https://www.dropbox.com/s/pq498r1dbcxd8pp/Screenshot%202014-11-26%2013.08.42.png?dl=0

      I’ve only just noticed this… it may not have been working before the update as I don’t use firefox.

      All other issues are fixed, thank you!

    • #6842

      Hi Johnny,

      I decided to resize my logo so it fits in with the default size for Samsara to avoid the hassle and everything works fine. Don’t worry about that anymore.

      I have a question about the search bar… I have hidden it, but it seems it’s still in the code.

      https://www.dropbox.com/s/2wizr8tujum5uy2/Screenshot%202014-11-26%2017.59.34.png?dl=0

      Can you please tell me the code that I need to delete to get rid of it completely?

      Thanks.

    • #6850

      I think you need to edit content-slidedown.php, remove the following code

       <!--Search-->
           <div id="slidedown-search">
             <h2 class="title"><?php _e('Search','Samsara');?></h2>
             <form method="get" action="<?php echo home_url();?>">
                     <select name="post_type" id="post_type">
                       <option value="post"><?php _e('Blog Posts','Samsara');?></option>
                       <option value="portfolio"><?php _e('Portfolios','Samsara');?></option>
                       <?php if(is_plugin_active('woocommerce/woocommerce.php')):?>
                       <option value="product"><?php _e('Products','Samsara');?></option>
                       <?php endif;?>
                     </select>
                     <input type="text" value="" name="s" class="top_search" placeholder="<?php _e('Enter Keywords','Samsara');?>" />
                     <input type="submit" value="<?php _e('Search','Samsara');?>" name="search" />
             </form>
           </div>
    • #6854

      Thank you!

    • #6859

      It’s my pleasure!

Viewing 13 reply threads
  • You must be logged in to reply to this topic.