1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How To Add Google +1 Button For Home Page Only?

Discussion in 'Google+' started by Nina Rose, Nov 25, 2014.

  1. #1
    Hello Friend
    I added google plus one button in my site, but its dynamic.

    i want google +1 button only for my home page. and it must be appear in every page/post of my site.

    That means i only want google plus vote for my Home page URL.

    Need your help.
    Thanks
     
    Nina Rose, Nov 25, 2014 IP
  2. ourstore

    ourstore Greenhorn

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #2
    Your site is a wordpress?
     
    ourstore, Nov 26, 2014 IP
  3. andrej

    andrej Notable Member

    Messages:
    3,210
    Likes Received:
    130
    Best Answers:
    0
    Trophy Points:
    220
    #3
    If your website is running on WordPress, you can use a social bookmarking plugin for this.
     
    andrej, Nov 26, 2014 IP
  4. WebLab

    WebLab Active Member

    Messages:
    229
    Likes Received:
    7
    Best Answers:
    2
    Trophy Points:
    65
    #4
    Add a php code to check if its a homepage.
     
    WebLab, Nov 26, 2014 IP
  5. ourstore

    ourstore Greenhorn

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #5
    If you are using a wordpress site, you must add this code:
    <?php if (is_paged()) { ?> <?php } elseif (is_home()) { ?><javascript code button><?php } ?>

    if you have a custom website add this:
    <?php if(basename($_SERVER['PHP_SELF']) == "index.php")
    { ?>
    <javascript code button>
    <?php }?>

    regards
     
    ourstore, Nov 26, 2014 IP
  6. Nina Rose

    Nina Rose Active Member

    Messages:
    116
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #6
    its for Mp3 Download site. the site run with php script.
    its not a wordpress site.
     
    Nina Rose, Nov 26, 2014 IP
  7. ourstore

    ourstore Greenhorn

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #7
    then use this code:
    <?php if(basename($_SERVER['PHP_SELF']) == "index.php")
    { ?>
    <javascript code button>
    <?php }?>

    or send me the ftp information and i will do for you!
     
    ourstore, Nov 26, 2014 IP
  8. Jim4767

    Jim4767 Prominent Member

    Messages:
    4,738
    Likes Received:
    766
    Best Answers:
    10
    Trophy Points:
    305
    #8
    So if I understand the OP correctly, you want someone to click a Google +1 on, for example, a product page (or some other non-homepage), but the vote will count for your home page?

    I have a sneaky suspicion that (1) will not please Google, because it's deceptive; and (2) the Google algorithm will have a way to figure out what you are doing and will either discount the false +1 or somehow penalize it.
     
    Jim4767, Nov 29, 2014 IP
  9. Nina Rose

    Nina Rose Active Member

    Messages:
    116
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #9
    Thanks for your valuable information.


    *** I don't know why DP send me a warning for this post.
    The Warning says "Started In Wrong Area"

    *** I'm sorry, is that a wrong area for this post related to Google Plus, if it is wrong area, which area is correct area??
     
    Nina Rose, Nov 30, 2014 IP
  10. Naina S

    Naina S Active Member

    Messages:
    203
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    93
    #10
    If your website is dynamic, use CRM to add the google plus code in the home page. it it is static first find out which page home page represent(index.html,default.html, home.php etc) then open the page in notepage and add the code and save. thanks
     
    Naina S, Nov 30, 2014 IP