Moving the locations of the buttons in Wordpress

georges55 Feb 08, 2012 01:26AM EST

Hi,

I am trying to find out how to move the location of the share buttons in WordPress (the basic twentyeleven theme). I have had a go and tried this for several hours, but to no avail. I have checked this forum carefully for previous questions, but haven't found any answers more detailed than "You'll need to modify the code".

The problem is that I am unable to figure out where the code that inserts the buttons actually is. I don't know what the code looks like, nor even what .php file it is supposed to be in. This is really odd, because I have been tracking it in Firebug and pouring over the code for hours. Yet I can't see any snippet of code in my WordPress theme that is adding the buttons. Even ran a grep search in Unix on my entire WordPress theme folder, and there isn't a single mention of addthis! This is one tough cookie to find.

If someone could tell me where this code snippet is (what it looks like, and what PHP file it is located in), that would be greatly appreciated. Then it'll be a simple matter of moving that snippet to a different spot; the spot where I want the buttons to show up instead.

Up 0 Rated Down
georges55 Feb 08, 2012 01:32AM EST
PS:

This is my site: http://global-qhr.org/

I am happy with the location of the AddThis icons in the post footer. I am just trying to move the icons at the top. I intend to put them to the right of "Posted on <date>". Tucked in nicely on the same line.
Up 0 Rated Down
Aaron (AddThis Happiness Specialist) Feb 09, 2012 11:02AM EST
Howdy,

The AddThis plugin dynamically adds the code to each post, it doesn't modify your theme, which is why your grep failed. To move the sharing widgets that normally are directly above the content, you can use the following code.

// Don't display the widget above normally.
add_filter('addthis_above_content', '__return_false');

// Paste the following code in your theme where you want the widgets that would normally be above the content
do_action('addthis_widget', get_permalink(), get_the_title(), 'above');


Does that do what you need? Is there anything else I can help with?

This question is closed to new answers.

Still need help?


General Topics

 

Developers