Sharing Code to Functions.php

Hey I am using the code I have found here in the forum to show sharing buttons automatically on all blog posts. But when I add it, I am getting this warning…

What am I missing?? It looks like the same code that support has given over and over here on the forum.
**Also, I love that new rollback when there is an error. First time I am seeing that. Is that X/PRO or is that Wordpress doing that?

THANK YOU!
Noelle

Hi Noelle,

This code should be fine:

function x_add_social_sharing ( $content ) {
	if ( is_singular('post') ) {
		echo do_shortcode('[x_share title="Share this Post" facebook="true" twitter="true" google_plus="true" linkedin="true" pinterest="true" reddit="true" email="true"]');
	}
}
add_action('x_before_the_content_end', 'x_add_social_sharing');

This is a new feature of the Wordpress update.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.