Here is the documentation for the Inline Tweet Sharer plugin.
- Download the plugin here and upload
inline-tweet-sharerfolder to the
/wp-content/plugins/directory, or search for it in the Plugins > Add New repository.
- Activate the plugin through the ‘Plugins’ menu in WordPress
Before using the plugin for the first time, it’s recommended you head to the Inline Tweet Sharer Settings page, and set it up to your needs.
Here’s the options on this page, and what each option does:-
- Default Twitter Handle – This allows you to set a default twitter handle to be included within the links. This handle will be included with a RT @______ at the beginning of your tweeted links. Can be overwritten by shortcode attributes, and removed entirely if a prefix is defined.
- Mark Twitter Links – If ticked, the twitter links are styled differently to normal links, if not then no style is applied.
- Use Dashicons – The default link uses an image for the twitter icon. If you are on WordPress 3.8 and above, Dashicons are included within the WordPress source. By ticking this box, you can use the Twitter Dashicon, rather than the standard image, appearing crisper and more scalable.
- Capitalise first letter of Tweet – If clicked, the first letter of the tweet will be capitalised. Useful if a lot of the tweets you could share are in the middle of sentences.
- Added class for the Wrapper Div (advanced) – This adds the ability to add a class to the div that wraps around the tweetable link. This can give you more control if you wish.
Premium Options – Google Analytics
The next section is only available in the Premium version.
You can assign Google Analytics variables in the premium version, and by default it uses the values below. You can read more about Google Analytics’s Custom Campaigns on Google Analytics’ site.
- Default Campaign Name – The Default Google Analytics Campaign that can be associated with all tweeted links.
- Default Campaign Source – The Default Google Analytics Source that can be associated with all tweeted links.
- Default Campaign Medium – The Default Google Analytics Medium that can be associated with all tweeted links.
- Default Campaign Term – The Default Google Analytics Term that can be associated with all tweeted links.
- Default Campaign Content – The Default Google Analytics Content that can be associated with all tweeted links.
Twitter Related Options
You can encourage users to follow related accounts in the premium version as well. This occurs after people tweet and can be encouraged to follow any account you wish.
- Twitter Handle to Follow – The twitter handle (no Twitter URL or @ sign) of the user you want people to follow by default.
- Description – This is a description to use to introduce your twitter follower. Use this to encourage those who already share your content to follow you.
Within any post/page you can make any text suitable for Inline Tweet Sharer by wrapping any text with [inlinetweet]][[/inlinetweet]. There are also a number of attributes:-
- Prefix – Adds text before the highlighted text. If not present, the default is used (if set).
- Tweeter – Adds a user before the highlighted text in the form of RT @______:, ignored if prefix is set. If not present, the default is used (if set).
- Suffix – Adds a user after the highlighted text. If not present, the default is used (if set).
- utmcampaign – Adds a UTM Campaign variable to the link (Premium Only)
- utmsource – Adds a UTM Source variable to the link (Premium Only)
- utmmedium– Adds a UTM Medium variable to the link (Premium Only)
- utmterm – Adds a UTM Term variable to the link (Premium Only)
- utmcontent – Adds a UTM Content variable to the link (Premium Only)
- related – Include a twitter account handle here to encourage sharers to follow your account.
- relateddesc – Include a description above the related twitter account, to encourage people to follow that account.
So for example, to create this Inline Tweet – read the Inline Tweet Sharer documentation , add this to your post:-
[inlinetweet prefix="click here to" tweeter="" suffix=" on @winwaruk"]]read the Inline Tweet Sharer documentation[[/inlinetweet]
Finally, if you’re using the visual editor, you can click on the Twitter button.
4. CSS Modification
The CSS classes for the plugin are the following:-
- a.inline-twitter-link – style for the entire link.
- a.inline-twitter-link span – style for the twitter logo at the end of the link.
- a:hover.inline-twitter-link – style for the entire link with when hovered over it.
- a:hover.inline-twitter-link span – style for the twitter logo at the end of the link when hovered.
5. bitly Integration
From version 1.3 onwards you can integrate Inline Tweet Sharer with bit.ly, so you can track traffic from your Inline Tweet Sharer links. To set this up, please do the following.
- Go to the OAuth App Creation Page on bit.ly at https://bitly.com/a/oauth_apps
- Click the “Get Registration Code” button to get a registration code emailed To You.
- Go to your email and click the link on the email sent to you.
- You will be sent to the bitly.com create application page. On this page, add the following:-
- For Application Name, put your site name.
- For Application Link, put your site URL.
- For Redirect URIs, put your site URL.
- Put anything you wish for the “Brief description of your application”.
- When created, on the Generate Access Token, confirm your password and click “Generate Token”.
- Return to the Settings > Inline Tweet Sharer Page and paste in the access token generated into the box entitled “Your Generic Access Token”. Now whenever you tick the box “Enable bit.ly integration”, the links created will be tracked by bit.ly.
6. Further Support
Support can be provided in one of two ways:-