• Skip to primary navigation
  • Skip to main content
  • Skip to footer
WP Social Rocket

WP Social Rocket

Out of this world social sharing shouldn't be rocket science.

  • Features
  • FAQs
  • Documentation
  • Support
    • My Tickets
    • Feature Requests
  • Products
  • Your Account
  • $0

[socialrocket-tweet] Shortcode

The [socialrocket-tweet] shortcode can be used to manually output a Click to Tweet in your post or page content.

You can also call a Click to Tweet via the global function social_rocket_tweet();

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

Argument Default Explanation
quote Text displayed on the page/post
tweet Text that populates the tweet
include_url global settings Whether to include the current page/post URL in the tweet. Accepts ‘true’ or ‘false’.
include_via global settings Whether to include the Twitter username in the tweet. Accepts ‘true’ or ‘false’.
style_id Default style Internal ID of saved style to use, instead of the default. The ID is found in the Click to Tweet settings next to the name of each saved style.
add_class String of extra CSS class name(s) to include in output.
force_css If ‘true’ outputs necessary CSS code inline, immediately before rendering buttons. Accepts ‘true’ or ‘false’.
url Specify URL to be included if not the page where the CTT will display.
via Specify @username to be included if not the one from the Social Extras settings.

Examples

Basic shortcode to output a Click to Tweet that shares the current page:

[socialrocket-tweet quote="This is what shows on my page or post." tweet="This is the tweet people will see on Twitter."]

Shortcode to share a different URL than the one where the Click to Tweet will display:

[socialrocket-tweet quote="This is what shows on my page or post." tweet="This is the tweet people will see on Twitter." url="https://domain.com/post-title/"]

Shortcode to use a particular style:

[socialrocket-tweet quote="This is what shows on my page or post." tweet="This is the tweet people will see on Twitter." style_id="5cce6030bc38d"]

Secure Online Payment
Money Back Guarantee
Fast & Friendly Support

Footer

Company

  • Affiliate Area
  • Affiliate Terms of Service
  • Terms of Service
  • Privacy Policy

Help Links

  • Support
  • Features
  • Documentation
  • FAQs

We’re glad you’re here!

Hey, you’re awesome! Thanks for visiting us and please let us know if you have any questions.

  • Email
  • Facebook
  • GitHub
  • Twitter
Copyright © 2018–2025 Social Rocket · All Rights Reserved