You already know how awesome I think Flattr is, especially for webcomics. Unfortunately it’s still a little clunky to integrate, preventing many people who want to adopt it from doing so.
It is easy to add a Flattr button to a single blog post, but if you have a large website it becomes a chore. If, like me, you are using WordPress the solution seems simple: use the Flatter Plugin. This not only adds the Flattr button to your posts but submits new posts to Flattr when you publish them. Alas, whilst I’m sure it is an excellent solution for many people, it didn’t work for me.
In the Plugin Debug I discover my problem: ‘No cURL extension found.’ Bugger. As tech savvy as I am this is not something I can fix. Fortunately I’ve figured out a couple of workarounds. These ought to work even if you have a different error.
Use an Ads Manager Plugin
WordPress has lots of Plugins available meant the help you manage the placement of advertisements on your page, but they often enable you to add any snippet of code. So we’ll use the Flattr Button code!
There are a number of Ads Manager plugins you could choose; I’m using Ads Adder. Install it (wp-admin -> Plugins -> Add New) and activate it. The navigate toe Settings -> Adds Adder (or whatever) and paste the code for your Flattr button wherever you want it to appear. (In Ads Adder there are only two choices: Above or below your blog post).
To get the code for your Flattr Button you will need to submit your Front Page to Flattr, or, if you have already done so, go to it’s listing and and click edit. Once you have saved (or resaved) it you will get an option to choose the button code. There are several designs to choose from (with their own instructions) but the static button is the simplest.
When you’ve finished the Flattr Button will appear on all your posts. When people click on it they will be Flattring your WHOLE SITE rather than individual blog posts, but rather this than they don’t Flattr at all!
If this solution clashes with with your other plugins (because you are running advertisements on your site, for example) or you REALLY want each post Flattred individually try the solution below:
Edit your theme
You will need the have the Flattr Plugin installed and connected to your Flattr account, then edit your WordPress Theme using either the backend editor (wp-admin -> Appearance -> Editor) or FTP (wp-content -> themes -> your_theme). You will need to insert the Flatter shortcode <?php the_flattr_permalink(); ?> to make it show up in all your blog posts.
Below are instructions for the Default theme and Comicpress (Version 188.8.131.52.3). If you are using a different theme you may have to experiment. Make sure you backup first, so if you break something you can simply replace the file you messed with.
DEFAULT: Open single.php and place the Flattr code below this line of code:
<?php the_content(‘<p>Read the rest of this entry »</p>’); ?>
The Flattr Button will show up underneath your blog post.
Comicpress 184.108.40.206.3: If using FTP you will need to navigate to the Funtions folder. Open displaypost.php and place the flatter code just before or just after this line of code:
<?php comicpress_display_the_content($is_comic); ?>
The Flattr button will appear before or after your post.
Please note that although the Flattr Button will appear on all your posts it will not work (i.e. be clickable) unless the post has been submitted to the Flattr.com directory.
I hope that helps. If you have any questions post a comment and I’ll do my best to answer. Needless to say I’d love to see more great creators on Flattr. They deserve lurve.