This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: Social Media buttons stripped from search results

#9318
Ernest MarcinkoErnest Marcinko
Keymaster

Hi!

The reason why you don’t see them is because the result objects are not the same as for example posts on an archive page – because of the difference in context.

I’ve looked at one of the plugins “Social media feather”, it has a great shortcode, where it is possible to add the URL, which is neccessary in this case – because the shortcode will not be able to recognize the result as a post, therefore won’t know it’s url.

I’ve put this code into the functions.php file in my active theme directory:

This appends and executes the social media share shortcode with the proper url. After that, my results looked like this: http://i.imgur.com/9Ga4MY6.png

I also turned off the Make the whole result area clickable? option on the Layout Options -> Results Behavior panel: http://i.imgur.com/WDFX6bQ.png