[socialrocket] Shortcode

The [socialrocket] shortcode can be used to manually output a set of inline buttons in your post or page content.

You can also call the inline buttons via global function social_rocket(); 

The shortcode accepts the following arguments (passed as an array if using the PHP function):

Argument Default Explanation
id current page ID The post ID, term ID, user ID, or (string) URL for which the buttons are being generated.
type post What type of ID was supplied. Accepts 'post', 'page', 'term', 'category', 'tag', 'taxonomy', 'user', 'url'.
add_class Adds CSS class(es) to the button wrapper div. No default as this is optional.
force_css false If 'true', outputs necessary CSS code immediately before buttons HTML output. Accepts 'true' or 'false'.
heading global settings Heading text for this set of buttons.
networks global settings Comma-separated list of buttons to be displayed. Defaults to the global settings for inline buttons.
share_url current page URL URL to share. Can be any URL, even one from a different domain.
show_counts global settings Whether to show counts on buttons. Accepts 'true' or 'false'.
show_total global settings Whether and where to show total share count. Accepts 'true', 'none', 'before', 'after'.


Here are the shortened versions of each network for use in the "networks" shortcode argument:

Buffer: buffer
Pinterest: pinterest
Print: print
Digg: digg
Hacker News: hacker_news
Pocket: pocket
Trello: trello
Xing: xing
Facebook: facebook
Reddit: reddit
Amazon Wishlist: amazon
Evernote: evernote
Line: line
Skype: skype
Tumblr: tumblr
Yahoo Mail: yahoo
LinkedIn: linkedin
Twitter: twitter
Blogger: blogger
Flipboard: flipboard
LiveJournal: livejournal
SMS: sms
VKontakte: vkontakte
Yummly: yummly
Mix: mix
Email: email
Delicious: delicious
Google Bookmarks: google_bookmarks
MySpace: myspace
Telegram: telegram
Sina Weibo: weibo


Basic shortcode that uses global settings and shares the page/post the shortcode is used on:


Shortcode to share a completely different URL:

[socialrocket share_url="https://google.com/"]

Shortcode to share a different post with ID 123:

[socialrocket id="123"]

Shortcode to share a portfolio post with ID 456:

[socialrocket id="456" type="portfolio"]

Shortcode to use global settings with a custom CSS class (.gray-box would need to be defined in theme or custom CSS):

[socialrocket add_class="gray-box"]

Shortcode to use specific networks and no counts:

[socialrocket networks="Twitter,Facebook,Mix" show_counts="false"]

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us