Buna ziua TagDiv!
Am urmatorul site: http://www.sociedelic.com si as dori sa adaug comentarii si pe mobil.
Pentru partea desktop fisierul comments.php a fost modificat, adica sters tot continutul si adaugat doar asta:
<div id=”fb-root”></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.4&appId=898431453537286″;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));</script>
<div class=”fb-comments” data-href=”<?php the_permalink(); ?>” data-width=”100%” data-numposts=”10″ data-order-by=”social” data-colorscheme=”light”></div>
Este in regula? Iar pentru mobil, as dori sa fiu indrumat de voi, ce trebuie sa modific/adaug. Am gasit niste raspunsuri dintr-un search dar nu inteleg ce trebuie sa modific.
Salut Incrosnatu,
Banuiesc ca vrei sa implementezi Facebook Comments pe Mobile Theme, nu? Tot ce trebuie sa faci este sa introduci codul de Java Script in header.php si pe urma in single.php inainte de get_footer() trebuie sa pui o alta conditie asa cum este in acesta captura de ecran, aici -> http://screencast.com/t/RkXH3FXXiWJv si aici -> http://screencast.com/t/lb3QhADMh Practic pentru versiunea de desktop trebuie sa adaugi exact acelasi cod doar in fisierele din main team. Pentru mai multe referinte in acest caz, poti sa consulti acest topic -> https://forum.tagdiv.com/topic/anybody-implemented-fb-comments/
Sper sa te ajute aceste sfaturi!
O zi faina in continuare!
Hello Fatih,
Most likely, this implementation does not work for child theme and that’s why you bring nothing. Please check the child theme support here -> https://forum.tagdiv.com/the-child-theme-support-tutorial/
Thanks for the message!
Salutare! Observ ca nu-mi mai apar comentariile facebook, probabil de la update-ul temei. Am urmat exact aceeasi pasi pentru implementarea codurilor.
Hello Incrosnatu,
Unfortunately, please notice that custom implementation was lost when you have updated the theme to the latest version of it. You need to customize again that section but please notice that we cannot provide any support for this. This is additional customization!
Thanks for your understanding!
I know that, i did it the same thing as before but didn’t worked now. I’m really sure that it’s easy for you, I just need to know what file I need to modify exactly, because i can’t find anything and other plugins don’t seems to work with custom template. I use Single Post Template 31, and I tried this tutorial but i don’t know what file i need to modify.
https://forum.tagdiv.com/topic/facebook-comments-2/
-
This reply was modified 7 years by
Incrosnatu.
If edit the template and i add to page the element “Single Post Comment” and after that appear wordpress comments not facebook comments. And comments.php is edited with this:
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2&appId=******&autoLogAppEvents=1';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="" data-width="100%" data-numposts="10" data-order-by="social" data-colorscheme="light" data-include-parent="true"></div>
-
This reply was modified 7 years by
Incrosnatu.
Hi,
So you want to add Facebook comments on mobile when using the mobile theme. The above should work same as before, there were’t any changes made to the mobile theme.
When using the mobile theme it will not matter what post template is used for desktop. There will be one predefined post template used for all the posts
– http://www.screencast.com/t/RkXH3FXXiWJv
To display Facebook comments in the cloud templates would not be possible, these don’t have php files in which you can add the code, like for default post templates.
It is possible with this plugin. Works great with cloud templates and mobile also.
https://wordpress.org/plugins/gs-facebook-comments/