This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Flattr Shortcode Widget


This is a widget that allows you to quickly and easily create a flttr widget within posts and pages using a simple shortcode. The advantage of having a shortcode is that it can be customised for every use. The short code has lots of customisability and can be used in a very basic way or with more advanced features.

The way the widget works is that within a post or page you include the shortcode and then that shortcode will generate all the javascript needed to embed the widget. That means you don’t need any knowledge of coding or js. As opposed to the official Flattr Widget, you do not need to embed a php function to get the widget or have it included in every post. You can call the shortcode from within a post or page and the most important thing is that you have the option to customise the widget every time! This does not mean that the official Flattr Widget does not have its place, and I actually recommend using both in conjunction!

This means that you can insert widgets that will Flattr pages other than the one you are on (for example some external content) and it will also allow you to set the Flattr User ID per widget meaning you can have multiple widgets for multiple people, or allow blogs that have multiple authors to add a Flattr widget that will flattr them (rather than the site) for their content.

For information on how to configure this plugin, installation information.

Arbitrary section

There are a few ways that the Widget can be used going up in complexity.

Super Simple (Requires official Flattr Plugin)

There are various ways that the Flattr Widget can be used. The most simple is to insert “[flattr /]” anywhere in a post. Using this will require that you have the official Flattr Widget installed and have set your Flattr UID on that (an independent setting will come in a later version).

Settings will be automatically set as stated:

*The button type will be set to large
*The User ID (as mentioned above) will be set to that which is set up in the official plugin
*The title will be set to the Page/Post title
*The description will be set to the Page/Post excerpt
*The category will be set to text
*The language will be set to English
*Tags will not be set
*The url will be set to the Page/Post’s permalink
*The thing will not be hidden from listings on


Simple is the most simple way of using my Flattr Widget if you do not have/want to install the official Flattr Plugin. It is also what you would use if you have multiple bloggers blogging on the same blog and each want to earn their own Flattry. To use this option, use the shortcode, “[flattr uid='{uid}’ /]” replacing {uid} with your Flattr User ID. The only difference between this simple option and the super simple option is that you are defining your Flattr User ID independently.

Settings will be automatically set as stated:

*The button type will be set to large
*The User ID will be set to whatever you have defined as {uid} in the shortcode
*The title will be set to the Page/Post title
*The description will be set to the Page/Post excerpt
*The category will be set to text
*The language will be set to English
*Tags will not be set
*The url will be set to the Page/Post’s permalink
*The thing will not be hidden from listings on

In a future build, some of these default settings will be customisable.

= Advanced
but still pretty simple! =

Finally, there is the advanced option. You can use the advanced shortscode, “[flattr uid='{uid}’ btn='{btn}’ tle='{tle}’ dsc='{dsc}’ cat='{cat}’ lng='{lng}’ tag='{tag}’ url='{url}’ hide='{hide}’ anc={anc} setanc={setanc} qty={qty} /]”. All variables are optional (defaults will be used if left blank). If, for example, you wanted the default url you could exclude all ”url=’{uid}’ ” and the default would be used. Leaving a variable empty will also result in the default being used but it is probably best practise to remove variables you are not going to be using. Note that if you do not set {uid} you do not need the “[/flattr]” either.

To use edit the shortcode you should change the parameter values (indicated with curly brackets surrounding them). The parameters are:

*btn – This is the type of button you would like to display. To get the compact button use ‘compact’ otherwise the default (large) button is displayed.
*uid – This is your personal user id. If not defined, it will be set to that which is set up in the official plugin providing that is set up and installed, otherwise the widget will fail!
*tle – This is the title of the thing you want to submit. This is typically the title of your blog entry or software name. If undefined the title of your Post/Page will be used.
*dsc – This is the full excerpt of the content. Some blog text or information about your song you’ve written or so forth. If undefined excerpt title of your Post/Page will be used.
*cat – This is the flattr category the content belongs to. You can choose between the following: text, images, video, audio, software, rest. If undefined text will be used.
*lng – Language of the submitted thing. List of available languages. If undefined Enlgish (en_GB) will be used.
*tag – This is the tags of the thing, to help people finding your content easier on the Flattr website. If you want to use multiple tags, separate using a normal comma (,) sign. If undefined no tags will be used.
*url – This is the URL of the thing, if this is not always the same on your site. Maybe you have multiple domains with the same content. This is to lock the content to always be recognized as the same content for Flattr. If undefined the permalink of your Post/Page will be used. If you have an anchor that you want to append, it would be best practice to append it using the ‘anc’ parameter.
*hide – Use this to hide the thing from listings on The value ‘true’ or ‘t’ will hide the thing. If undefined the the thing will be shown on listings on
*anc – Appends an anchor to the url (saves you having to write the whole URL just to add an anchor). If a unique anchor is used on each widget it allows for multiple widget on the same URL. This must be unique otherwise 2 widgets with the same ‘url’ and ‘anc’ they will be the for the same flattr. Default is blank.
*setanc – This value is ignored if no anchor is set, if it is set then it will add a code to the top of the widget so that the defined anchor redirects to the widget’s location. This means that when people follow the link from, they will be taken to the location of the widget on the page. This is good if you want to have multiple flattrs for different sections and you put the flattr widget at the top of each section. Set to ‘1’ to set to true, ‘0’ to set to false. Set to false if you want to manually input the anchor code (if for example you wanted it elsewhere rather than at the point of the widget or you just wanted the backlink from to go to your page as normal)
*qty – Allows for you to have as many Flattr widgets as you want. Whatever number you set the value to will be the ammount of unique flattr widgets that will be created. Uses anchors to make them unique and is compatible with the ‘anc’ variable – it may cause problems if an anchor is set in the ‘url’ variable. Default is ‘1’.


  • Example of the widget using the Multi-Flattr feature
  • Example of the widget on a page


The Flattr Shortcode Widget in my Feed is a static image pointing to

Flattr need to update the way their API works to allow for a flattr to be submitted without someone flattring and be able to return a value with the flattr page for your submission. If you manually creat the thing on Flattr or the thing has been created on flattr then you can add “rssurl={rssurl}” as a variable and replacing {rssurl} with the url of your thing on flattr.



*NEW: Screenshots of plugin
*NEW: Ability to flattr developer from settings page


*BUG FIX: Quote marks cause the generated widget to be invalid.


*BUG FIX: A function was used that stopped backward compatability before version 3.0


*NEW: Flattr UID option for induvidual users allowing each user to have their own default Flattr UID
*NEW: Options Page to set the default Flattr UID for the blog
*UPDATE: Flattr Shortcode modified – new uid tag added


*UPDATE: More tags added


*BUG FIX: Feeds would try and render the javascript button.
*NEW: RSS displays a Flattr this image in substitute of the js widget but this links to the flattr home page due to Flattr API restictions
*BUG FIX: Default widget size is not reset to large after creating a compact widget if the Official Flattr Widget is not installed.
*BUG FIX: Name change was not fully migrated


*BUG FIX: Anchor now set when used with multi-flattr feature
*BUG FIX: Anchors tag is now closed properly
*UPDATE: Additional flattrs made by multi-flattr are hidden from listing on to stop spamming
*BUG FIX: Further whitespace removal to all variables


*NEW: Anchors added so that multiple flattrs can be used on the same URL
*NEW: Your backlink from flattr can link straight back to the widget rather than just back to the page (uses anchors)
*NEW: You can define how many flattr widgets you want to be generated and each work independantly (allows multiple flattrs)
*NEW: You can use multiple flattrs and anchor features simultaniously
*UPDATE: All true/flase values must now be set to ‘1’ (true) or ‘0’ (flase)
*BUG FIX: Hide not always set to true
*BUG FIX: Default language now works
*UPDATE: Arrays now used instead of lots of independant variables
*BUG FIX: Whitespace in variables that would cause the widget to fail is now removed


*BUG FIX: Decription was not filled in if not manually set


*BUG FIX: Problems with svn sync fixed
*BUG FIX: Version numbers corrected


*UPDATE: Widget name changed from “Flattr Widget” to “Flattr Shortcode Widget”
*BUG FIX: Fixed “Fatal error: Using $this when not in object context”


*UPDATE: Major updates to readme.txt
*NEW: Added to WordPress Plugin Directory
*BUG FIX: Bug that interfered default size of widget for official plugin has been corrected


*NEW: Codebase created
*NEW: readme.txt created

Contributors & Developers

This is open source software. The following people have contributed to this plugin.

Browse the code