Forum › General Inquiry
Hello! I’m trying to add code for comments from Facebook but it doesn’t work.
Where do I have to add the code to work for each page separately?
Tools -> Custom HTML -> check if you have tab “After every post” – if yes, you can put there facebook comments code 🙂
-- Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!
How to change the url address to display correctly for each post?
<script async defer crossorigin=”anonymous” src=”https://connect.facebook.net/bg_BG/sdk.js#xfbml=1&version=v8.0″ nonce=”XuZ6N5rN”></script>
I suppose that the only way is create script tag dynamically and use window.location to get a proper URL
var scr = document.createElement(‘script’); scr.setAttribute(‘src’, window.location.href + ‘/test.js’); document.body.appendChild(scr);