Support » Fixing WordPress » Can't Figure Out How to Put Meta Description on Actual Website

  • Resolved rmarce

    (@rmarce)


    Hi, I have meta descriptions on all the pages on my site, but the overall page (rmarcejaeger.com) seems not to have a description associated with it. Google only shows the http://www.rmarcejaeger.com in its search results, and website graders show that rmarcejaeger.com is missing its meta description data. All I can figure out is how to put the description on the individual pages. How can I put the description on the overarching website? Note that I do have a tagline set in the wordpress settings.

    I am using a child theme based on the parent theme Platform.

    Thanks for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • kmessinger

    (@kmessinger)

    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.

    kmessinger

    (@kmessinger)

    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
    	}
    
    	?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can't Figure Out How to Put Meta Description on Actual Website’ is closed to new replies.