Forums

[resolved] Meta Description (4 posts)

  1. MyDaily-Gadget
    Member
    Posted 1 year ago #

    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.
    http://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?

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    <?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 } ?>
  3. MyDaily-Gadget
    Member
    Posted 1 year ago #

    thank you so much.

  4. rmarce
    Member
    Posted 1 year ago #

    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)

Topic Closed

This topic has been closed to new replies.

About this Topic