How do I add a Share button at the end of my posts like the screenshot below?

How do I add a Share button at the end of my posts like the screenshot below?

Hi Sheina,

Thank you for reaching out to us. To add the social share buttons on your blog posts, add the following code in your child theme’s functions.php file

function x_add_social_sharing() {
		if ( is_single() ) {
  			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');

Let us know how this goes!

Thanks Nabeel!

Is there a list of shortcodes that I might find useful in the future if I ever want to put additional stuff in my site? Just wondering if there’s a list on that and I happened to miss it.

Thank you!

Hello Sheina,

Thanks for updating the thread.

Yes, you can take a look at following page for the list of shortcodes categorized in 4 main stacks that X Theme offers. Please click on any of the stacks to get the list of shortcodes. Here’s a screencast that you can also take a look.

Thanks.

I want to use all these shortcodes on my EVERY post. They’re the following:

  1. Accordion

  2. Drop cap

  3. Icon List

  4. Table of Contents

  5. Pull Quote

And some of these OCCASIONALLY:

  1. Buttons
  2. Alert

MY QUESTIONS ARE THE FOLLOWING:

  1. Will these shortcodes slow down my site?
  2. Should I use shortcodes SPARINGLY instead?
  3. What are the disadvantages of using shortcodes? Specifically YOUR shortcodes on this specific theme.

Thanks a lot!

Hi Sheina,

  1. It shouldn’t slow down your site, but any site regardless of implementation. It will get slower if you add more contents. Longer content, the longer data processing. It’s true even if you don’t use short code :slight_smile:

  2. Yes you could.

  3. The downside of having many short codes is content management. For that aspect, builder is still preferable. Builder elements are the counterpart of those manually added shortcodes (except TOC shortcode).

Thanks!

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