3
FEB
17:54

Tiny Twitter Tools Patch

I use Twitter Tools to import my twitters to my WordPress blog. I also use twitter to update my Facebook status. But I also use Simplaris Blogcast to update my Facebook feed with my blog posts. Social Web Geek. I know. This caused some double posts at Facebook. If I posted a twitt it updated my Facebook status, then my blog got updated, and my blog sent a ping with the Update Service to Simplaris Blogcast and updated my Facebook feed. So every twitter post got posted twice at Facebook. Not the best thing since sliced bread.

I was searching like mad to find where in the WordPress code the Update Service was sent. I found a posts at the WordPress.org forum from someone with the same problem. Kinda. But no solution.

However. At last, by mostly by chance and after a tip from TDH I found out that if I removed all twitter posts from my feeds. The update service didn’t send them to my ping services. This might be common knowledge for everyone. But for you who didn’t know this. This is the patch I made to my Twitter Tools to remove them from my feeds and, ergo, they was removed from my Facebook Simplaris Blogcast Feed updates…

function aktt_pre_get_posts($wp_query) {
	global $bloggy;
	if ($wp_query->is_feed) {
		$wp_query->query_vars['category__not_in'][] = get_option('aktt_blog_post_category');
	}
}
add_action('pre_get_posts', 'aktt_pre_get_posts');
Posted by David — Share: http://fmasc.net/vg
Post new comment to Tiny Twitter Tools Patch









Advance users: Click to view allowed XHTML tags.