Support » Plugin: Twitter » Twitter Cards images and Tweet Button shortcode?

  • Resolved JoeCanWrite


    Hi there,

    Thanks for creating this plugin, I really appreciate being able to write custom tweets for each post.

    I’ve got a question about Twitter Cards – how does the plugin decide which image to use in a photo card – is it always the featured image?

    Also, do you have an example of what the Tweet Button shortcode should look like, when it includes hashtags, a custom message, and user name?

    I know there is documentation here but it doesn’t give an example.

    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Niall Kennedy


    All cards except gallery support a single image. The plugin tries to automatically select a best match. You can override this match by acting on the twitter_card filter.

    A selected image should meet the minimum image dimension requirements of the current card. If your featured images is 120 pixels wide and the minimum image size of the Twitter Card is 250 the search for an appropriate image should continue.

    Plugin v1.0.0 behavior:

    • Featured image if supported by the post type (thumbnail feature)
    • Image attachments mapped as children of the current post
    • Galleries in the post content
    Plugin Author Niall Kennedy


    A Tweet Button short code used inside the content area will inherit the Tweet text and hashtags entered in the post meta box and the via @username pulls from the site @username entered in the settings page. You should treat the shortcode parameters as overrides for these defaults.

    [twitter_share text="Play ball" hashtags="baseball" via="MLB"]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Twitter Cards images and Tweet Button shortcode?’ is closed to new replies.