Featured Post

ApplyHQ launched

After many hours of work i’m proud to say - it’s done. On June, 15th ApplyHQ.com launched successfully. I am grateful for the support of my twitter friends. They have given me many helpful hints i’m going to implement next days and weeks. ApplyHQ.com is a web application providing freelancers...

Read More

Use tweetmeme plugin with redtime theme

Posted by Lars | Posted in Wordpress | Posted on 05-06-2009

2

While i was setting up the new theme to this blog i found a small problem with the tweetmeme plugin. The featured post wasn’t displayed correctly because of the javascript code from tweetmeme.

It has costed me some efford but here comes the solution. This bug can be fixed easily by modifying the fn-general.php file inside the themes/redtime/includes folder.

You have to modify the function: the_content_limit around line 207.

Search following code in the function:

1
2
$content = str_replace(']]>', ']]>', $content);
$content = strip_tags($content);

and replace it with

1
2
3
$content = str_replace(']]>', ']]>', $content);
$content = preg_replace("'<script[^>]*>.*</script>'siU",'',$content);
$content = strip_tags($content);

What does this line? The regular expression removes all code between the script tags. So the javascript code from tweetmeme is removed and the featured post will be displayed properly.

delicious | digg | reddit | facebook | technorati | stumbleupon | chatintamil

Comments (2)

I found this fix didn’t work at all for my issue which was overflowing of featured posts when the “Read More” link was selected.

A simple fix was, in the WP administration dashboard, go to “settings” then “permalinks”. Change the setting from default to the next radio button down “Day and Name”. Save the settings.

Problem solved.

I just installed this theme and activated the Tweetmem plugin and I can’t see what problem you fixed. Not sure if it got fixed, but wanted to ask in case I am missing something - and did not want to alter the code of the theme if it was not necessary. Thanks.

My site: http://designsbytierney.com/blog

Write a comment