• Resolved rcal1

    (@rcal1)


    I think I remember reading somewhere where you can add a description in wordpress. And that will appear under your site on Google search. Just wondering if I’m right, and if so how to do it…

    Thanks, Ray…

Viewing 3 replies - 1 through 3 (of 3 total)
  • With a plugin: https://www.ads-software.com/extend/plugins/all-in-one-seo-pack/

    With a custom field:
    -Create a custom field named description
    -Add the following to your header.php file between the head.

    <meta name="description" content="<?php $description = get_post_meta($post->ID, 'description', true);
    		if($description) { ?>
    			<?php echo $description; // get the description if it exests ?>
    	<?php } else { ?>
    		some generic description in case you forgot to fill the description customfield
    	<?php } ?>
    " />
    Thread Starter rcal1

    (@rcal1)

    Thanks hilj, I appreciate you help on this…Ray…

    Hi, I’m having the same problem, but just tried this and it didn;t work for me. Any chance this code is wrong??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Google description for a site’ is closed to new replies.