Often, people want to put more than one Like and Share buttons on the same web page. For example, one to like the domain name of the website (e.g. www.example.com) and another to like the particular article (e.g. www.example.com/my-article). Moreover, sometime you might want to show a like button opposite every item in a list of articles! Let’s see how it is done. Many people simply copy the code provided by Facebook and paste it in their webpage. For the next button they will create another instance of the code from Facebook and paste it again in their web page. This creates multiple instances on fb-root div in your code. To avoid this place the following code right before opening the body tag: When you add a Facebook Like button on a webpage, you need to understand that every such button likes a unique URL. That is to say that every FB Like button must be associated with a unique URL. Use the following code to add as many Like buttons as you want. Just keep pasting this code wherever you need the Like button:
You can have multiple buttons if you repeat the above DIV tag. Just don’t forget to change the data-href value as required. If you’ll paste this DIV multiple times but will not change the data-href value, you will still see multiple FB Like buttons but they all will show same number of likes because they all will be associated with one URL. If you follow these steps and change data-href value appropriately, all your Like buttons should be working fine now! This is how multiple buttons are placed on a webpage. It works for most people but if it is not working for you, you need to investigate the issue as there could be something wrong elsewhere in your website.