Jump to content
Sign in to follow this  
Alejandro

Adding a meta description tag to the WordPress homepage

Recommended Posts

Alejandro

WordPress doesn't have built-in functionality to add meta tags to pages. If you have setup a static homepage using a WordPress page there's no simple way to add a meta description to this page without installing a 3rd party plugin. In this case you can add the code below to the iReview theme functions.php file to easily add the meta description tag to the homepage without the need for extra plugins.

function homepage_meta_description()
{
    if ( is_front_page() ):?>

        <meta name="description" content="Meta description text here" />

    <?php endif;
}

add_action( 'wp_head', 'homepage_meta_description' );

Share this post


Link to post
Raymond Ringston

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Share this post


Link to post
Alejandro

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Share this post


Link to post
Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Please refer to our Privacy Policy.