I have a problem here. With the FaceBook Comment system.. I have a website where i have multiple pages (several hundred). Now when i add facebook comment box on all the pages with my template file and try to comment on one of my pages, that comment is coming on all the pages. I need the comment to be shown only on the page for which it is given. The command that puts the code on the page is like this: <div class="fb-comments" data-href="URL" data-num-posts="4" data-width="435"></div> The "URL" would be the URL of the actual current page of the site. Problem is, is that I need to find a way to automatically call the current URL of each page and fill that value in for that data-href= command. Anyone know of any PHP code to make this happen?
You can try: <div class="fb-comments" data-href="<?php echo $_SERVER['PHP_SELF']; ?>" data-num-posts="4" data-width="435"></div> Code (markup):