Jump to content
Sign in to follow this  
vanesvanin

How to add 'addThis' code to single.php

Recommended Posts

vanesvanin

Hello All: I need to add the following code to the top of the single.php so that I can see the social media share buttons in each post at the begining. Any help? <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style "> </div> <script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script> <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e1379a96c4a34f4"></script> <!-- AddThis Button END --> Thanks a lot in advance! :) Vanesa

Share this post


Link to post
Share on other sites
timlinson

Try using the `pagelines_inside_top_theloop` hook. Something like this in the platformbase/functions.php file: ` add_action('pagelines_inside_top_theloop', 'vg_share'); function vg_share() { ?> SHARE CODE HERE <?php } `

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×