Support » Plugins » Ignore/remove direct tweets: Twitter Tools Feature code

  • Alex King,

    I use Twitter and thus Twitter Tools to create Aside posts. I do not like these Asides to include direct tweets (prefaced with ‘@’). The following code removes all Tweets that begin with ‘@’. I have my code addition hard-coded, but this would be a great option to include within the Plugins Options page and wanted to share this option with the WordPress Plugin community.

    – – – – – – – – – – – –
    Insert at line 213
    – – – – – – – – – – – –

    if(substr($data["post_content"], 0, 1) != '@') {
    			$post_id = wp_insert_post($data);
    			add_post_meta($post_id, 'aktt_twitter_id', $tweet->tw_id, true);

    Now my only Asides posts (tweets) are non-direct tweets (which makes much more sense to me then listing half conversations that people can’t follow by reading your website).

Viewing 2 replies - 1 through 2 (of 2 total)
  • That’s a great addition. However, I plugged it into the code, uploaded the new file and it didn’t work. I put it in line 213, which was between another command and nothing. Then I took out what command was on line 212 and it still didn’t work.

    Think it’s a great idea and would love to integrate it but it’s not working for me, any ideas?

    Sorry, I’m not sure why it didn’t work. I wrote a longer tutorial named Ignore direct tweets and SEO URLs with Twitter Tools WordPress Plug-in on my blog, DesignWell. I hope that helps. It’s a little more detailed. I can always send you my file if you give me your email address.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ignore/remove direct tweets: Twitter Tools Feature code’ is closed to new replies.