Use the [ inline-social-share ] shortcode to embed a customizable social sharing widget.
🔧 Shortcode #
[ inline-social-share ]
You can enhance it using several optional attributes:
⚙️ Attributes #
socials
(optional) #
Default:facebook,instagram,whatsapp,tiktok,twitter,linkedin,qr
Usage:
Define which social platforms to display.
Example:
- This will only show Instagram and Facebook.
- Does not affect the “Copy Link” button or the device’s default share modal.
- Using this will hide the QR modal.
copy
(optional) #
Default:true
Usage:
Show or hide the copy-to-clipboard button.
Example:
link
(optional) #
Default:
(empty)
Usage:
Manually specify the link to be shared.
Example:[ inline-social-share link="https://levcharity.com/about/" ]
Overrides
currentPostLink
if both are set.
Preview:
currentPostLink
(optional) #
Default:true
Usage:
Automatically uses the current page/post URL as the shared link.
Example:
sharer
(optional) #
Default:true
Usage:
Enables or disables the native device share modal (if available).
Example:
link_class
(optional) #
Usage:
Add custom CSS classes to the “Copy Link” button.
label
(optional) #
Default:Share:
Usage:
Custom label shown before the social buttons.
Example:
🎨 Customization & Developer Hooks #
🔁 WordPress Filters #
Modify shortcode attributes and UI:
levit_block_social-share-inline_atts
Use this to customize passed attributes, icons, and labels.
Modify the QR code logo:
levit_block_social-share-inline_logo_src
- Defaults to: Levcharity > Image > Organization Logo
- Fallback: WordPress Site Icon
QR Code – Main Color (dots):
levit_block_social-share-inline_qr_main_color_force
- Default: average color of the logo
- Fallback: Levcharity’s magenta
QR Code – Secondary Color (corners):
levit_block_social-share-inline_qr_secondary_color_force
- Default: lighter version of average logo color
- Fallback: Levcharity’s magenta
Sharer – Custom SVG icon for button
levit_block_social-share_sharer_icon
- Default:
📡 JavaScript Events #
QR Modal Generated:
Event: levit-inline-social-share-qr-generated
- Triggered on:
document.body
event.detail.modalWrapper
gives you access to the QR modal wrapper element for further customization or styling.