Basic Shortcode
The simplest way to add social sharing buttons is using the basic shortcode:
[lion_social_share]
This will display social sharing buttons with your default settings from the plugin options page.
✨ Example Result:
The shortcode above will show all enabled social platforms using your selected default style (Default, Compact, Lion, etc.).
Shortcode Parameters
You can customize the social sharing buttons by adding parameters to the shortcode:
| Parameter | Description | Options | Default |
| style | Button display style | default, compact, compact-square, compact-diamond, compact-hexagon, lion | default |
| platforms | Specific platforms to show | facebook, twitter, linkedin, pinterest, whatsapp, etc. | All enabled |
| title | Custom title for sharing | Any text | Current page title |
| url | Custom URL to share | Any valid URL | Current page URL |
| alignment | Button alignment | left, center, right | left |
| size | Button size | small, medium, large | medium |
Shortcode Examples
Style Examples
🎨 Different Styles
Default style:
[lion_social_share style="default"]
Compact round buttons:
[lion_social_share style="compact"]
Lion theme style:
[lion_social_share style="lion"]
Square compact buttons:
[lion_social_share style="compact-square"]
Platform Selection
🌐 Specific Platforms
Only major platforms:
[lion_social_share platforms="facebook,twitter,linkedin,whatsapp"]
Social media only:
[lion_social_share platforms="facebook,twitter,instagram,tiktok"]
Professional platforms:
[lion_social_share platforms="linkedin,email,copy"]
Custom Content
📝 Custom Title & URL
Custom sharing text:
[lion_social_share title="Check out this amazing WordPress plugin!"]
Share specific URL:
[lion_social_share url="https://lionwp.com/plugins/" title="LionWP Plugins"]
Complete custom share:
[lion_social_share url="https://lionwp.com/demo/" title="Try Lion Social Share Demo" platforms="facebook,twitter,linkedin"]
Styling Options
🎯 Alignment & Size
Center-aligned buttons:
[lion_social_share alignment="center"]
Large buttons, right-aligned:
[lion_social_share size="large" alignment="right"]
Small compact buttons, centered:
[lion_social_share style="compact" size="small" alignment="center"]
Advanced Examples
⚡ Complex Configurations
Mobile-optimized sharing:
[lion_social_share style="compact" platforms="whatsapp,facebook,twitter,email" alignment="center"]
Blog post sharing:
[lion_social_share style="default" platforms="facebook,twitter,linkedin,pinterest,reddit" size="medium"]
Landing page CTA:
[lion_social_share style="lion" platforms="facebook,twitter,linkedin" title="Share with Lion Social Share!" alignment="center" size="large"]
Where to Use Shortcodes
In Posts and Pages
Add shortcodes directly in the WordPress editor:
- Classic Editor: Paste the shortcode anywhere in your content
- Block Editor (Gutenberg): Add a "Shortcode" block and paste the code
- Page Builders: Most page builders support shortcodes in text/HTML elements
In Widgets
Add social sharing to sidebars and widget areas:
- Go to Appearance → Widgets
- Add a "Text" or "Custom HTML" widget
- Paste your shortcode in the widget content
In Theme Files
For developers, use shortcodes in theme templates:
<?php echo do_shortcode('[lion_social_share style="compact"]'); ?>
💡 Pro Tip
When using shortcodes in theme files, always wrap them in the do_shortcode() function to ensure they render properly.
Troubleshooting Shortcodes
Shortcode Not Working
- Check spelling: Ensure [lion_social_share] is spelled correctly
- Plugin activation: Make sure Lion Social Share plugin is activated
- Parameter format: Use quotes around parameter values: style="compact"
- Platform names: Use lowercase platform names without spaces
Buttons Not Displaying
- Platform availability: Check if specified platforms are enabled in plugin settings
- Theme conflicts: Try switching to a default WordPress theme temporarily
- JavaScript errors: Check browser console for JavaScript errors
- CSS conflicts: Check if theme CSS is hiding the buttons
Styling Issues
- Style not applying: Clear any caching plugins
- Alignment problems: Check if your theme has conflicting CSS
- Mobile display: Test on different screen sizes and devices
🔧 Still Having Issues?
If shortcodes aren't working, try adding this basic shortcode first: [lion_social_share] to test if the plugin is functioning correctly.