Home > Dev > WordPress SEO > Add Meta Tags for SEO

Add Meta Tags for SEO

This code adds basic meta tags for SEO to the head section of your WordPress site.

// Add this to your theme's functions.php file

function add_meta_tags() {
    echo '<meta name="description" content="Your website description here">';
    echo '<meta name="keywords" content="keyword1, keyword2, keyword3">';
    echo '<meta name="robots" content="index, follow">';
add_action('wp_head', 'add_meta_tags');