Shortcode Usage Guide

Learn how to use Lion Social Share shortcodes to add social sharing buttons anywhere on your WordPress site

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:

In Widgets

Add social sharing to sidebars and widget areas:

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

Buttons Not Displaying

Styling Issues

🔧 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.

Scroll to Top