code social buttons for posts and pages

Posted in: Newsmag
Post count: 81

Where should I paste code social buttons for posts and pages?
I placed in the file before single.php get_footer (); But then the page is not loaded.

<script type=”text/javascript”>(function() {
if (window.pluso)if (typeof window.pluso.start == “function”) return;
if (window.ifpluso==undefined) { window.ifpluso = 1;
var d = document, s = d.createElement(‘script’), g = ‘getElementsByTagName’;
s.type = ‘text/javascript’; s.charset=’UTF-8′; s.async = true;
s.src = (‘https:’ == window.location.protocol ? ‘https’ : ‘http’) + ‘://share.pluso.ru/pluso-like.js’;
var h=d[g](‘body’)[0];
h.appendChild(s);
}})();</script>
<div data-user=”1628830748″ class=”pluso” data-background=”#ebebeb” data-options=”medium,square,line,horizontal,counter,theme=04″ data-services=”vkontakte,odnoklassniki,facebook,twitter,google,moimir,email,print”></div>

get_footer ();

Post count: 1291

Hi,

Unfortunately i didn’t do any tests with this one, you could try to add the script in the header – http://screencast.com/t/Wh8grZfkB
And the div in loop-single (if you use the other styles you have to edit all loop-single 1-8 files) – http://screencast.com/t/1NjDdBiLgsf

Also make sure the quotes are not formated, they should look like this:

class="pluso"

Not like this:

class=”pluso”

Thank you, Emil G.

Post count: 81

I put all the code in a file loop-single-7.php and it helped. In which file to insert code to the pages also display social buttons?

Post count: 6600

Hi,

You need to edit the page templates for the pages you want it on and place the div where you want it. For the pages that you build via page builder you need to edit this files: http://screencast.com/t/S6eMK4A2rygi

Thanks

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newsmag’ is closed to new topics and replies.