July 23, 2013 at 6:34 pm #52151
I am using the WPSocialite plug in on my site (www.noahsdad.com/target-down-syndrome) and I’m wanting to put the sharers directly below the post titles. I know Genesis has hooks to do this, and I can add the code in my functions.php file, but I’m not really sure how to do this. Would someone mind helping me out. The instructions for the plug in say that you can manually put the sharers into your theme, so it seems like it is posable. Here are some instructions from their plugin. Thanks in advance for your help:
Can I add the social links myself instead of letting the plugin place them?
Of course! Use the “manual” setting under the plugin settings (Settings->Discussion) and then use the following template tags in your template to display the links however you please.
The first template tag is to echo out the markup and display WPSocialite:
<?php wpsocialite_markup(‘large’); ?>
The second template tag is to get WPSocialite’s mark up and place it in an object, if needed:
$wpsocialite = get_wpsocialite_markup(‘small’);
When using this method, be sure to include “large” or “small” inside the function (as seen above) to define which style WPSocialite will use to display your social links.July 23, 2013 at 6:42 pm #52154
You can do this another way by using this code:
$args = array( 'size' => 'large', //choose which size buttons to display. 'url' => 'http://google.com', //use this to override the url that is sent to WPSocialite. Not recommended to use in loop. 'button_override' => 'facebook,twitter-share,twitter-follow,pinterest,linkedin,gplus,stumbleupon' //used to override buttons that are displayed. Add and remove as needed. ); wpsocialite_markup( $args );
July 23, 2013 at 6:47 pm #52155
Thanks Brad. Is there a difference in which one I use? What do you think is the best way? And do I just add this to the bottom of my functions.php?
One other thing, I’d also like these icons to appear at the bottom of my posts as well. Can I add that to this code?
Thanks so much for your help, I REALLY appreciate it!July 23, 2013 at 6:51 pm #52156
I added the first option to the end of my functions.php and I had a few issues…first I’d like it to use the “large” share buttons (I think I’m supposed to put that in there somewhere)
and 2nd, for some reason it is showing I have 6.9 million facebook likes on every single post! While that would be awesome, it’s not correct.
Any thoughts?July 23, 2013 at 6:53 pm #52157
Ok, I’ve changed the icons from small to large, and it looks like it fixed that. One odd thing that is going on is when you try to share something with one of the sharers it is sharing a link to Google vs the page the link is on. Not sure what’s going on there.July 23, 2013 at 6:55 pm #52158
Here is an FAQ for that plug in if it helps. Thanks again for your help with this!July 23, 2013 at 7:32 pm #52160
Use this for after single posts:
Or you could try using theme together
I’m not familiar with this plugin and how it works so you would need to read the plugin docs for customization of the display settings.
I think you replace the url with your own or the sharing url, not sure.
Note: I suggest you install WordPress locally with a copy of your theme if you’re customizing your site using PHP code so you can test code and modify it.
July 23, 2013 at 7:33 pm #52161
Hmm..thanks so much for your help. I really appreciate it. Could you tell by the faq’s if there was something I need to enter in there url area to pull the current url? If I put in just my site, won’t it always share the url I put in there as opposed to the current page?July 23, 2013 at 7:49 pm #52163
I just noticed in your code you said there were a few things I could add and remove as needed. Do you think that is what is causing the problem?
These two options? ‘url’ => ‘http://google.com’, //use this to override the url that is sent to WPSocialite. Not recommended to use in loop.
‘button_override’ => ‘facebook,twitter-share,twitter-follow,pinterest,linkedin,gplus,stumbleupon’ //used to override buttons that are displayed. Add and remove as needed.
It looks like that url is overriding the current page..should I delete that part? Also you have some code in there about button override and to add and remove as needed. Not sure what that is for…would you mind explaining? (What is it overriding, and what would be the reasons for me to add or remove them?
Thanks again for all of your help!July 23, 2013 at 8:04 pm #52165
Really not sure because i only grabbed that code from the plugin site as i know how to print it using a shortcode in a custom function with genesis hook.
I think all the code within the shortcode would be customizable which is why i suggest modifying it locally first to see what the changes do.
I have no experience with that plugin and use Jetpack sharing which is easy to customize. Slim Jetpack also includes the sharing module.
July 23, 2013 at 8:07 pm #52168
Ok, thanks for the heads up. I posted the code on the plug in website, hopefully the developer will chime in.
I would like to use jetpack as well, but they use the old style of the facebook button, which means when someone hits the “like” button they aren’t given the option to share the post to their wall with some custom text. I’m not sure why they are still using the older version of the facebook like button.
You must be logged in to reply to this topic.