3

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.

4

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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