As of version 0.3.0 there have been some changes to the syntax of the Flatr Shortcode Widget so I have rewritten this guide accordingly! There are still the 3 methods that there were before for inserting the widget however for this guide, I have simplified it down to two!


The simple method (as the name suggests) is the easiest way to add a widget to your blog posts and pages! It will use all the default settings and all you have to do is insert the code!

[flattr /]

When you use this simple widget, here is how your widget will be configured:

  • The button type will be set to large
  • The User ID will be set to the author’s flattr id (if it is set and enabled in the settings), failing that it will be set to the default flattr ID set on the settings page or through the official Flattr 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


You can also customise this code so that you can manually set the variables when calling the shortcode.

[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.

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 The User ID will be set to the author’s flattr id (if it is set and enabled in the settings), failing that it will be set to the default flattr ID set on the settings page or through the official Flattr plugin, otherwise the widget will fail and return an error!
  • 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’.