I put my meta data in the header.php file and that seems to work fine.
Thread Starter
rmarce
(@rmarce)
I did that, but it still is not registering it as meta data for the whole webpage.
I have never worried about this as my sites are not really about making money like your is so I didn’t even know about web graders :^)
I went here, http://websitegrader.com/site/www.rmarcejaeger.com and it showed the meta description of your site.
meta data for the whole webpage
Don’t understand that either. Maybe someone else (govpatel?)with SEO knowledge can jump in here.
Thread Starter
rmarce
(@rmarce)
This is what I ended up doing. I think it takes care of all contingencies. I put it in the head part of my header
<?php
if ( is_singular() )
{
if ($seodescription = get_post_meta($post->ID, "my_description", true))
{
?>
<meta name="description" content="<?php echo $seodescription; ?>" />
<?php
}
else
{
?>
<meta name="description" content= "<?php echo get_bloginfo( 'description' ); ?>" /> <!-- THE TAGLINE OF YOUR BLOG -->
<?php
}
}
elseif ( is_home() ) // THE BLOG PAGE
{
?>
<meta name="description" content= "Pens & PCs is blog featuring well-informed articles about writing and computers, among other topics."; /> <!-- THE TAGLINE OF YOUR BLOG -->
<?php
}
elseif ( is_category() )
{
if ( is_category("Other") )
{
?>
<meta name="description" content= "Pens & PCs blog posts about a variety of topics."; />
<?php
}
elseif ( is_category("Writing") )
{
?>
<meta name="description" content= "Articles about writing from the blog Pens & PCs."; />
<?php
}
elseif ( is_category("Computers") )
{
?>
<meta name="description" content= "Articles about computers from the blog Pens & PCs."; />
<?php
}
}
else
{
?>
<meta name="description" content= "<?php echo get_bloginfo( 'description' ); ?>" /> <!-- THE TAGLINE OF YOUR BLOG -->
<?php
}
?>