{"id":2192,"date":"2024-03-01T09:52:07","date_gmt":"2024-03-01T09:52:07","guid":{"rendered":"https:\/\/wpshortcode.org\/?p=2192"},"modified":"2024-03-01T09:52:08","modified_gmt":"2024-03-01T09:52:08","slug":"social-media-builder","status":"publish","type":"post","link":"https:\/\/wpshortcode.org\/social-media-builder\/","title":{"rendered":"Social Media Share Buttons Shortcode"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Below, you&#8217;ll find a detailed guide on how to add the <strong>Social Media Share Buttons Shortcode<\/strong> to your WordPress website, including its <strong>parameters<\/strong>, <strong>examples<\/strong>, and <strong>PHP function code<\/strong>. Additionally, we&#8217;ll assist you with common issues that might cause the Social Media Share Buttons Plugin shortcode not to show or not to work correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting, here is an overview of the Social Media Share Buttons Plugin and the shortcodes it provides:<\/p>\n\n\n<p>    <div class=\"plugin-info-box\">\n        <div class=\"top-main\">\n            <!-- SVG Image -->\n            <div class=\"plugin-image\">\n                <img decoding=\"async\" src=\"https:\/\/ps.w.org\/social-media-builder\/assets\/icon-128x128.jpg?rev=1580406\" alt=\"Plugin Icon\" \/>\n            <\/div>\n            \n            <div class=\"plugin-descriptive-part\">\n                <!-- Plugin Name with Link -->\n\n                    <a class=\"plugin-title\" href=\"https:\/\/wordpress.org\/plugins\/social-media-builder\" target=\"_blank\" rel=\"noopener\">\n                        Social Media Share Buttons                    <\/a>\n\n\n                <!-- Plugin Description -->\n                <p class=\"plugin-description\">\n                    &quot;Social Media Share Buttons is a versatile WordPress plugin that allows you to add and customize share buttons for different social media platforms, boosting your site&#039;s engagement.&quot;                <\/p>\n            <\/div>\n        <\/div>\n\n        <!-- Rating and Additional Info -->\n        <div class=\"plugin-meta\">\n            <span class=\"plugin-rating\">\n                <span class='stars'>\u2605\u2605\u2605\u2605\u2606<\/span> (60)\n            <\/span>\n            <span class=\"plugin-active-installs\">\n                <strong>Active Installs<\/strong>: 3000+\n            <\/span>\n            <span class=\"plugin-tested\">\n                <strong>Tested with<\/strong>: 5.0.20            <\/span>\n            <span class=\"plugin-php-version\">\n                <strong>PHP Version<\/strong>: false            <\/span>\n        <\/div>\n\n        <!-- List of Included Shortcodes -->\n        <div class=\"plugin-shortcodes\">\n            <strong>Included Shortcodes:<\/strong>\n            <ul>\n                <li>[sgmb]<\/li>            <\/ul>\n        <\/div>\n    <\/div>\n    <\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Social Media Share Buttons [sgmb] Shortcode<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Social Media Builder (SGMB) shortcode is a versatile tool that allows you to display your social media widgets. It utilizes the &#8216;sgmb&#8217; shortcode to initiate the SgmbWidget class, which contains your social media widget settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode<\/strong>: <code>[sgmb]<\/code><\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a list of all possible sgmb shortcode parameters and attributes:<\/p>\n\n\n<p>Based on the provided code, it appears that the shortcode does not take any specific parameters. The function &#8216;showShortCode&#8217; only accepts a general $args argument, which can be any array of arguments. However, the function does not specify what these arguments should be, nor does it use them in any way. Instead, it simply creates a new instance of the &#8216;SgmbWidget&#8217; class and calls its &#8216;init&#8217; method, passing the $args array to it.<\/p>\n<p>Therefore, without additional information about what parameters the &#8216;init&#8217; method of the &#8216;SgmbWidget&#8217; class accepts and how it uses them, it&#8217;s impossible to provide a list of specific parameters for this shortcode.<\/p>\n<p>Thus, the response is: <\/p>\n<p>NO_PARAMS<\/p>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Examples and Usage<\/h3>\n\n\n<p><strong>Basic example<\/strong> &#8211; A simple way to use the shortcode is to just call it without any parameters, like so:<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[sgmb]<\/code><\/pre>\n\n\n<p><strong>Advanced examples<\/strong><\/p>\n<p>Now, let&#8217;s look at more advanced usage of the shortcode. You can pass various parameters to customize the output. The parameters are passed in a key=value format, separated by spaces. Here are some examples:<\/p>\n<p>1. Displaying a specific social media button:<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[sgmb id=\"facebook\"]<\/code><\/pre>\n\n\n<p>In this example, we&#8217;re specifying the id parameter to display the Facebook button.<\/p>\n<p>2. Displaying multiple social media buttons:<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[sgmb id=\"facebook,twitter,linkedin\"]<\/code><\/pre>\n\n\n<p>Here, we&#8217;re passing multiple ids separated by commas to display Facebook, Twitter, and LinkedIn buttons.<\/p>\n<p>3. Displaying a social media button with a custom title:<\/p>\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">[sgmb id=\"facebook\" title=\"Follow us on Facebook!\"]<\/code><\/pre>\n\n\n<p>In this example, we&#8217;re using the title parameter to customize the text displayed on the Facebook button.<\/p>\n<p>Please note that the actual parameters and their values might vary depending on the configuration of the SgmbWidget class and the social media builder plugin.<\/p>\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Function Code<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In case you have difficulties debugging what causing issues with <code>[sgmb]<\/code> shortcode, check below the related PHP functions code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode line<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_shortcode('sgmb', array($this, 'showShortCode'));<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Shortcode PHP function<\/strong>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; light: false; title: ; toolbar: true; notranslate\" title=\"\">\nfunction showShortCode($args)\n\t{\n\t\t$widget = new SgmbWidget();\n\t\treturn $widget-&gt;init($args);\n\t}\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Code file location<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">social-media-builder\/social-media-builder\/classes\/SGMB.php<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that you&#8217;ve learned how to embed the <strong>Social Media Share Buttons Plugin shortcode<\/strong>, understood the parameters, and seen code examples, it&#8217;s easy to use and debug any issue that might cause it to &#8216;not work&#8217;. If you still have difficulties with it, don&#8217;t hesitate to leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below, you&#8217;ll find a detailed guide on how to add the Social Media Share Buttons Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we&#8217;ll assist you with common issues that might cause the Social Media Share Buttons Plugin shortcode not to show or not to work correctly. Before starting, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"name":"Social Media Share Buttons","slug":"","version":"2.1.0","author":"<a href=\"https:\/\/www.sygnoos.com\">Social Media Share Buttons By Sygnoos<\/a>","icons":"https:\/\/ps.w.org\/social-media-builder\/assets\/icon-128x128.jpg?rev=1580406","plugin_tags":"{\"share\":\"share\",\"share-buttons\":\"share buttons\",\"social\":\"social\",\"social-buttons\":\"social buttons\",\"social-media\":\"social media\"}","author_profile":"https:\/\/profiles.wordpress.org\/sygnoos\/","requires":"3.8","tested":"5.0.20","requires_php":"false","rating":94,"num_ratings":60,"active_installs":3000,"downloaded":272476,"last_updated":"2018-12-07 2:16pm GMT","added":"2015-12-24","homepage":"http:\/\/plugins.sygnoos.com\/wordpress-social-buttons\/","short_description":"Social Media Share Buttons plugin provides you social share buttons, effects, themes and other awesome options to make your page more shareable.","description":"\"Social Media Share Buttons is a versatile WordPress plugin that allows you to add and customize share buttons for different social media platforms, boosting your site's engagement.\"","shortcodes":"[\"sgmb\"]","footnotes":""},"categories":[1],"tags":[],"class_list":["post-2192","post","type-post","status-publish","format-standard","hentry","category-plugins"],"_links":{"self":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/2192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/comments?post=2192"}],"version-history":[{"count":1,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/2192\/revisions"}],"predecessor-version":[{"id":2714,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/posts\/2192\/revisions\/2714"}],"wp:attachment":[{"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/media?parent=2192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/categories?post=2192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpshortcode.org\/wp-json\/wp\/v2\/tags?post=2192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}