Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Can anyone recommend a simple plugin that allows me to add/edit meta tags for keywords and description on each page of my wordpress site? Just something that adds the fields to the page editor would be ideal. Not looking for SEO megapack or whatever.

Thanks, John.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

the simple solution would be to paste this snippet of code in your theme's functions.php file :

add_action('wp_head','keywords_and_desc');
function keywords_and_desc(){
    global $post;
    if (is_single()||is_page()){
        if(get_post_meta($post->ID,'my_keywords',true) != '') 
            echo    '<meta content="'.get_post_meta($post->ID,'my_keywords',true).'" name="keywords">';
        if(get_post_meta($post->ID,'my_description',true) != '') 
            echo    '<meta content="'.get_post_meta($post->ID,'my_description',true).'" name="description">';
    }
}

And the just add keywords and description using the built in custom fields on a new/edit post/page screen, name the keywords field my_keywords and the description field my_description.

or you can use a very lightweight and simple plugin called Simple Meta Tags

share|improve this answer
    
Sounds perfect, thanks for that! –  John Hunt Jun 1 '11 at 23:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.