Hello everyone!
Probably the hottest events in the city last blog are the bad guys go on pretending Thach comment seriously misleading, it must move past that TP blog facebook comments system may be permanent but one of the things that have inadequacies.
So, in my first post, I will guide you add website, blog and Facebook comment system by adding one more big that comment by Google + without using plug-ins, quick, show beautiful.
Using the system and google + facebook comments are appropriate and beneficial for personal blogs, news sites or one of the other categories, but why, I did not mention here.
Step 1: Insert the js plugin Facebook and Google +
This step will insert one of your script before the </ body> in the theme.
Specifically inserted footer.php file
<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/vi_VN/all.js#xfbml=1";fjs.parentNode.insertBefore (js, FJS);} (Document, 'script', 'facebook-jssdk')); </ script><Script type = "text / javascript">gcfg = {lang window .___ 'vi'}; (Function () {var po = document.createElement ('script'); po.type = 'text / javascript'; po.async = true;po.src = 'https://apis.google.com/js/platform.js';var s = document.getElementsByTagName ('script') [0]; s.parentNode.insertBefore (po, s);}) ();</ Script>
Step 2: Declare comment on theme framework.
Once include js then, the next step is to declare the position displaying the comment. Most of us will insert it under the bottom of the post.
At this point there are two options:
Replace the WordPress comment system (recommended).
Add your comment below by WordPress.
To make us open single.php file and find sections
<? Php comments_template (); ?>
Replace if option 1 or inserted directly below if you choose option 2.
<Div class = "tabs comment"><Input id = "tab-1" type = "radio" name = "radio-set" class = "tab-selector-1" checked = "checked" /><Label for = "tab-1" class = "tab-label-1"> <i class = "fa-fa-square facebook"> </ i> Facebook </ label> <Input id = "tab-2" type = "radio" name = "radio-set" class = "tab-selector-2" /><Label for = "tab-2" class = "tab-label-2"> <i class = "fa fa-google-plus-square"> </ i> Google + </ label><Div class = "clear-shadow"> </ div> <Div class = "content-tab"><Div class = "tab-1"><Div class = "fb-comments" data-href = "<? Php the_permalink ();?>" Data-width = "650" data-numposts = "15" data-colorscheme = "light"> </ div></ Div><Div class = "tab-2"><Script src = "https://apis.google.com/js/plusone.js"> </ script><Div class = "g-comments" data-href = "<? Php the_permalink ();?>" Data-width = "650" data-first_party_property = "BLOGGER" data-view_type = "FILTERED_POSTMOD"> </ div></ Div></ Div></ Div>
P / S: the data-width values are customized according to your size yourselves styles.
Step 3: Makeup a bit with CSS3
Done step 2 above, you have to push Facebook and Google+ comment enough already, but if such default will be bad and cause long-equipped too, so we will leave it displayed as tabs offline.
Insert this into css section style.css file in the theme folder
/ * Tabs comment * /{.tabsmax-width: 650px;margin: 0 auto;position: relative;clear: both;padding-top: 20px;}.tabs h3 {font-size: 15px; background: # C0392B; color: #fff; padding: 0 20px; margin: 0 -24px;}.tabs input {position: absolute;top: 0;left: 0;display: none;}.tabs label {display: block;float: left;position: relative;padding: 10px 20px;line-height: 1.5em;min-width: 55px;text-align: center;color: # 222;font-size: 13px;font-weight: bold;letter-spacing: 1px;cursor: pointer; }.tabs label: after {content: "";display: block;position: absolute;width: 100%;height: 5px;background: #fff;left: 0;bottom: -5px;}.clear-shadow {clear: both;}.content-tab {position: relative;width: 100%;border-top: 1px solid #DDD;padding-top: 10px;margin-top: -1px;}.content-tab> div {overflow: hidden;top: 0;left: 0px;opacity: 0;display: none;transition: opacity .4s;-moz-transition: opacity .4s;-webkit-transition: opacity .4s;-ms-transition: opacity .4s;-o-transition: opacity .4s;}
.tabs input: checked + label {background: url (https://fbstatic-a.akamaihd.net/rsrc.php/v2/yf/r/PfBgtiydy5U.gif) no-repeat bottom center; z-index: 1}.tabs input.tab-selector-1: checked ~ .content-tab .tab-1,.tabs input.tab-selector-2: checked ~ .content-tab .tab-2 {opacity: 1; display: block;}
Now you into any one article and enjoy the fruits of his public.
Here is the demo on your site is using
Comment with facebook

0 comments: