1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to add meta description to home page?

Discussion in 'Blogging' started by r.s.mahanti, Jan 20, 2013.

  1. r.s.mahanti

    r.s.mahanti BANNED BANNED

    Joined:
    Dec 12, 2009
    Messages:
    131
    Likes Received:
    36
    I have a wordpress blog. I did not create single page in it. All I created are posts. Now I always keep my latest post on front. The problem is meta description of the front page. How to set the meta description of the front page? I am using the SEO plugin by yoast. But I can't set the meta description of home page as there is no home page. Kindly suggest me something friends.
     
  2. xstumpedx

    xstumpedx Regular Member

    Joined:
    Sep 4, 2010
    Messages:
    246
    Likes Received:
    42
    Occupation:
    The Internet
    Location:
    NY
    Shoot me a PM
     
  3. r.s.mahanti

    r.s.mahanti BANNED BANNED

    Joined:
    Dec 12, 2009
    Messages:
    131
    Likes Received:
    36
    @http://www.blackhatworld.com/blackhat-seo/members/136426-xstumpedx.html
    PM sent.
     
  4. kbklash

    kbklash Senior Member

    Joined:
    Jun 2, 2012
    Messages:
    1,140
    Likes Received:
    449
    Location:
    in my BMW to my BHW
    Home Page:
    Take a complete backup of your blog before editing the core files

    Appearance > Editor > Select header.php
    Add the code below,between the <head> and </head> tags

    Code:
    <?php if (  (is_home()) || (is_front_page())  ) { ?>
    <meta name="description" content="add your description here" />
    <?php } elseif (is_single()) { ?>
    <meta name="description" content="<?php the_excerpt();?>"/>
    <?php } ?>
     
    • Thanks Thanks x 1
  5. mickyfu

    mickyfu Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 14, 2011
    Messages:
    5,279
    Likes Received:
    15,474
    Location:
    Jennifers Office.
    Just use a plugin like seo ultimate or yoast
     
  6. ReggaeShark

    ReggaeShark Elite Member

    Joined:
    Jul 27, 2010
    Messages:
    1,952
    Likes Received:
    606
    Gender:
    Male
    Occupation:
    The Tea Seller
    Location:
    India
    Whatever meta you'll put in the general setting of yoast will become the meta of ur site..
    and for the posts you can do that manually when you create posts..

    though ppl say yoast is having more features.. I personally prefer all in one seo.. its simple and easy to handle.
     
    • Thanks Thanks x 1
    Last edited: Jan 20, 2013
  7. ija61

    ija61 Senior Member

    Joined:
    Mar 2, 2011
    Messages:
    960
    Likes Received:
    634
    Gender:
    Male
    Occupation:
    The first SEO economist:)
    Location:
    Romania
    Home Page:

    I will also recommand to use All in One SEO.

    Just install the plugin and then when you will enter each page below the content area you will get your meta/keyword and title and all can be change.
     
  8. r.s.mahanti

    r.s.mahanti BANNED BANNED

    Joined:
    Dec 12, 2009
    Messages:
    131
    Likes Received:
    36
    Problem solved with this code. Thank you very much.

     
  9. hootsparta

    hootsparta Jr. VIP Jr. VIP

    Joined:
    Aug 23, 2012
    Messages:
    1,410
    Likes Received:
    328
    Occupation:
    Unique and Spun Blogpost, Real Guest Posting.
    Location:
    Sparta World to BHW
    Home Page:
  10. Josh Jocky

    Josh Jocky Registered Member

    Joined:
    Aug 28, 2012
    Messages:
    90
    Likes Received:
    12
    Occupation:
    Link Building Analyst
    Why you are wasting time in editing codes just use Platinum SEO Pack WordPress plug-in then use meta description to home page at same time to every posts.