• Resolved mydaily-gadget

    (@mydaily-gadget)


    Hello there,

    I added the following meta description into my header.php file

    <meta name=”Description” content=” The latest news and guides in the cellphone, laptops, PC, tablets and games area. We also make the latest downloads and reviews, thanks to our great team.” />

    It works OK, excepting the fact that it doesn’t appear only on my main page. It shows on all of my pages. In the following image I have searched for the title of my post.
    https://img707.imageshack.us/img707/8551/capturepjt.jpg

    How can i make this meta description appear only on my main page, leaving Google to decide what to show for others?

Viewing 3 replies - 1 through 3 (of 3 total)
  • <?php if( is_front_page() || is_home() ) {?>
    <meta name="Description" content=" The latest news and guides in the cellphone, laptops, PC, tablets and games area. We also make the latest downloads and reviews, thanks to our great team." />
    <?php } ?>
    Thread Starter mydaily-gadget

    (@mydaily-gadget)

    thank you so much.

    That code above is good, although if your front page is a static page, then both your home page and your blog will share the same description. If you want to differentiate between the two, place the is_front_page() and is_home() in different if statements (is_home is actually your blog page, whatever you yourself might consider to be your “home” page)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Meta Description’ is closed to new replies.