Minggu, 30 Juli 2017

20.49
One of the first plugins we install when we are creating a new WordPress website or when we on-board a new SEO client who already has a WordPress website is WordPress SEO by Yoast. It’s a great tool to have on your website to monitor on-page SEO, as well as handling some more technical things like sitemap creation, webmaster verification, and even some basic rich snippets.
One issue that I have encountered on a few websites is that once the plugin is installed, duplicate site titles will appear across the whole site. It doesn’t happen every time I install it – so it must be dependent on the theme you are using. However, I have noticed it enough to feel like posting a fix is necessary. This fix is a bit more technical, so if you aren’t comfortable editing code, you may want to talk to your webmaster.
There are two parts to this fix. The first part is simple: log into WordPress and go to the Yoast plugin options. It should be labeled ‘SEO’ on the menu bar. Go to ‘Titles & Metas’ and under the ‘General’ tab you should see an options for ‘Enable force rewrite titles.’ Make sure this is unchecked.
The second part requires you to have access to edit the header.php file, either in the WordPress editor or any other file editor you have access to. You will need to replace the contents of the <title> tag. The default code in this section will look different from one theme to the next, but the fix is the same no matter what.
**If you’re not comfortable editing code, be sure to consult your webmaster!
Replace everything in between the <title>…</title> with this snippet of code.
<title><?php wp_title(''); ?></title>
This should fix the duplicate site title issue. You will have to go to each page and use the Yoast plugin to make sure your page titles are exactly how you want them to look.
____________________________________________________________
<!doctype html >
<!--[if IE 8]>    <html class="ie8" lang="en"> <![endif]-->
<!--[if IE 9]>    <html class="ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->
<head>
    <title><?php wp_title('|', true, 'right'); ?></title>
    <meta charset="<?php bloginfo( 'charset' );?>" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php
    wp_head(); /** we hook up in wp_booster @see td_wp_booster_functions::hook_wp_head */
    ?>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-63629033-1', 'auto');
  ga('send', 'pageview');

</script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-9633790911091268",
    enable_page_level_ads: true
  });
</script>
</head>
______________________________________________________
BECOME
<!doctype html >
<!--[if IE 8]>    <html class="ie8" lang="en"> <![endif]-->
<!--[if IE 9]>    <html class="ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->
<head>
    <title><?php wp_title(''); ?></title>
    <meta charset="<?php bloginfo( 'charset' );?>" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php
    wp_head(); /** we hook up in wp_booster @see td_wp_booster_functions::hook_wp_head */
    ?>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-63629033-1', 'auto');
  ga('send', 'pageview');

</script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-9633790911091268",
    enable_page_level_ads: true
  });
</script>
</head>

_________________________________


Source : https://hadigitalmarketing.com/how-to-fix-wordpress-seo-yoast-duplicate-site-titles/

0 komentar:

Posting Komentar