Social Share Icons & Social Share Buttons Shortcode

Below, you’ll find a detailed guide on how to add the Social Share Icons & 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 Social Share Icons & Social Share Buttons Plugin shortcode not to show or not to work correctly.

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

Plugin Icon
Social Share Icons & Social Share Buttons

"Social Share Icons & Social Share Buttons is a dynamic WordPress plugin that allows you to effortlessly integrate share buttons across your site, boosting your site's social media presence."

★★★★☆ (1909) Active Installs: 30000+ Tested with: 6.4 PHP Version: false
Included Shortcodes:
  • [USM_plus_form]

[USM_plus_form] Shortcode

The Ultimate Social Media Plus shortcode facilitates the creation of a subscription form. It fetches the subscriber’s form data from the ‘sfsi_plus_section9_options’ and ‘sfsi_plus_feed_id’ options.

Shortcode: [USM_plus_form]

Examples and Usage

Basic example – Show a subscription form with the Ultimate Social Media Plus plugin

[USM_plus_form /]

This shortcode will display a subscription form. The form’s appearance and submission URL are determined by the plugin’s settings.

Advanced examples

Display a subscription form with custom heading text and button text. This assumes that you have modified the sfsi_plus_get_subscriberForm function to accept these parameters.

[USM_plus_form heading="Subscribe to our newsletter!" button_text="Sign Up Now" /]

In this example, the shortcode will display a subscription form with the heading “Subscribe to our newsletter!” and the button text “Sign Up Now”.

Display a subscription form with a custom placeholder for the email field. This also assumes that you have modified the sfsi_plus_get_subscriberForm function to accept this parameter.

[USM_plus_form email_placeholder="Enter your email here" /]

In this example, the shortcode will display a subscription form with the placeholder text “Enter your email here” for the email field.

PHP Function Code

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

Shortcode line:

add_shortcode( "USM_plus_form", "sfsi_plus_get_subscriberForm" );

Shortcode PHP function:

function sfsi_plus_get_subscriberForm() {
	$option9 			= maybe_unserialize(get_option('sfsi_plus_section9_options', false));
	$sfsi_plus_feediid 	= sanitize_text_field(get_option('sfsi_plus_feed_id'));
	if ($sfsi_plus_feediid == "") {
		$url = "https://api.follow.it/subscribe";
	} else {
		$url = "https://api.follow.it/subscription-form/";
		$url = $url . $sfsi_plus_feediid . '/8/';
	}
	$return = '';
	$return .= '<div class="sfsi_plus_subscribe_Popinner">
		<form method="post" onsubmit="return sfsi_plus_processfurther(this);" target="popupwindow" action="' . $url . '">
			<h5>'.trim( $option9['sfsi_plus_form_heading_text'] ).'</h5>
			<div class="sfsi_plus_subscription_form_field">
				<input type="hidden" name="action" value="followPub">
				<input type="email" name="email" value="" placeholder="' . trim( $option9['sfsi_plus_form_field_text'] ) . '" />
			</div>
			<div class="sfsi_plus_subscription_form_field">
				<input type="submit" name="subscribe" value="' . esc_attr( $option9['sfsi_plus_form_button_text'] ) . '" />
			</div>
		</form>
	</div>';
	return $return;
}

Code file location:

ultimate-social-media-plus/ultimate-social-media-plus/libs/sfsi_plus_subscribe_widget.php

Conclusion

Now that you’ve learned how to embed the Social Share Icons & 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 *