14
2008
BDP RSS hack - Not polling "Hello world!" posts
I recently installed BDP RSS plugin for my WPMU site. On the frontpage I'm using BDP RSS to display MPMU sitewide feed. To my surprise, BDP RSS plugin doesn't come with the option to filter out certain posts (such as the default "Hello world!" post that WPMU installs in every new user blog).
So here is the hack that I did to accomplish this.
In bdp-rss-update.php, line 62 - 69 should read:
// extract and save key item information
$counter = 1;
foreach ($pfeed['items'] as $item)
{
$ticks = 0;
$link = $item['link'];
$title = $item['title'];
After $title = $item['title'];, insert this code:
if(strcasecmp($title,'hello world!')!=0) {
Now we'll need to put in the closing } to our 'if' block. Around line 200 you should find:
$counter++;
Go ahead and close up the if statement, so it should look like this:
$counter++;
}
That's it! You can download the hack here: BDP RSS hack
RELATED POSTS
WordPress database error: [Can't find FULLTEXT index matching the column list]
SELECT ID, post_title, post_content,MATCH (post_name, post_content) AGAINST ('bdp rss hack not polling hello world posts') AS score FROM wp_posts WHERE MATCH (post_name, post_content) AGAINST ('bdp rss hack not polling hello world posts') AND post_date <= '2008-08-20 05:02:35' AND (post_status IN ( 'publish', 'static' ) && ID != '13') AND post_password ='' ORDER BY score DESC LIMIT 5

