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
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
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!
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.
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??
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