How to use static flattr buttons

If I understand you correctly, you want to add the Flattr button to your posts but instead of using the Flattr JavaScript API you just want the button image to be saved on your server and go to your Flattr page when clicked.

I have embedded a working example into this answer and will provide the code and instructions below.

working example:


WordPress Post Title

orem ipsum dolor sit amet, consectetur adipiscing elit. Duis eros libero, ullamcorper id ultrices ac, ultrices a magna. Vivamus sit amet tempus justo. Sed risus tellus, volutpat id sagittis sit amet, vehicula commodo ipsum. Nunc adipiscing sagittis ligula in tempor. […]


To have this button automatically added to the bottom of each post:

Save the image to your local machine
then upload it to WordPress using the
media uploader. Make note of the
img URL or highlight and copy to
your clipboard.

Open your themes functions.php file and add the following code somewhere.

<?php
    add_filter('the_content', 'pvitt_flattr_this' );
    add_filter('the_excerpt', 'pvitt_flattr_this' );

    function pvitt_flattr_this() {    
         echo '<a href="http://flattr.com/thing/64811/dotnetphen-com"><img src="http://www.dotnetphen.com/blog/2011/04/flattr-badge-large.png" /></a>';
    }
?>

The button that links back to your Flattr page will now be added to end of every post or post excerpt.