Easy Social Share Buttons Shortcode

Below, you’ll find a detailed guide on how to add the Easy Social Share Buttons Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Easy Social Share Buttons Plugin shortcode not to show or not to work correctly.

Before starting, here is an overview of the Easy Social Share Buttons Plugin and the shortcodes it provides:

Plugin Icon
Easy Social Share Buttons

"Easy Social Share Buttons is a dynamic WordPress plugin designed to amplify your site's social media presence. It effortlessly integrates share buttons for various platforms, boosting your site's reach and engagement."

★★★✩✩ (11) Active Installs: 2000+ Tested with: 4.9.24 PHP Version: false
Included Shortcodes:
  • [ess_post]

Easy Social Share Buttons [ess_post] Shortcode

The Easy Social Share Buttons shortcode allows you to share posts. It’s defined as ‘ess_post’, and you can customize it using the ‘share_type’ attribute. This shortcode calls the ‘share_post_shortcode’ function, which builds the share buttons based on the ‘share_type’ attribute. By default, it’s set to ‘basic’.

Shortcode: [ess_post]

Parameters

Here is a list of all possible ess_post shortcode parameters and attributes:

  • share_type – Determines the style of the share buttons

Examples and Usage

Basic example – The shortcode below enables the display of basic share buttons on your post or page.

[ess_post share_type=basic /]

PHP Function Code

In case you have difficulties debugging what causing issues with [ess_post] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'ess_post', array($this, 'share_post_shortcode') );

Shortcode PHP function:

function share_post_shortcode( $atts, $content = null ) {
		$options = shortcode_atts( array(
			'share_type' => 'basic'
		), $atts );

		$button_type = $options['share_type'];

		return $this->build_share_buttons( $button_type );
	}

Code file location:

easy-social-share-buttons/easy-social-share-buttons/includes/class-easy-social-share-buttons.php

Conclusion

Now that you’ve learned how to embed the Easy Social Share Buttons Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *