Quantcast
Viewing all articles
Browse latest Browse all 134530

vistatech on "Add a specific meta description to homepage only"

I have WordPress SEO by Yoast installed on my blog. I am having trouble adding meta description to my homepage. Please,don't assume I haven't tried google for a solution. I've done the Homework.
So, Joost's SEO Plugin doesn't allow you to add a meta description to the homepage. So, what can I do to fix this. I need to add a meta description for my blog.
I found the code below here but can't figure out what the <?php the_excerpt();?> should be. I dunno what Joost uses there.

<?php if (  (is_home()) || (is_front_page())  ) { ?>
<meta name="description" content="Blog description goes here" />
<?php } elseif (is_single()) { ?>
<meta name="description" content="<?php the_excerpt();?>"/>
<?php } ?>

And, one more thing I noticed - if I added a description to the head in header.php, using the general code i.e., <meta name="description" content="Blog description goes here" />, I get the same description for every article and page when analysed with seocentro's meta tag analyzer.

BTW, I use Imag Mag Theme
So, please help me fix this thing.


Viewing all articles
Browse latest Browse all 134530

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>