Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I was wondering if there is a way or a plugin to post something like twitter update messages instead of a post.

Something like http://p2demo.wordpress.com/ but better, where a user will post update messages not an entire post (in database matters). That means you will save space, make it quicker and fewer database resources.

I am looking for a way to post lite messages, that database will only save the must, like IDs, title, post and a thumb, through php maybe. No taxonomies and and and.

I hope you understand what I am trying to say (sorry for any bad English)

Thank you.

Updated: I found this code, should I use this as a twitter posting feature? (As I said I need fewer db resources)

// Create post object
$my_post = array();
$my_post['post_title']    = 'My post';
$my_post['post_content']  = 'This is my post.';
$my_post['post_status']   = 'publish';
$my_post['post_author']   = 1;
$my_post['post_category'] = array(0);
// Insert the post into the database
wp_insert_post( $my_post );"
share|improve this question
    
I think you're striving for optimisation in the wrong place. You'd get a much better reward implementing a front-end cache like W3 Total Cache or WP Super Cache if you're after speed. –  TheDeadMedic Jun 19 '11 at 15:19

1 Answer 1

up vote 1 down vote accepted

The code you posted is about the same one WordPress uses to insert posts in to the database so it's not really saving anything.

But i would suggest you use Custom Post type and only allow a few or as much as needed objects to it :

  • 'title'
  • 'author'
  • 'excerpt'
  • 'custom-fields'
  • 'comments' (assuming you want to allow comments.)

This will not save you any extra unneeded fields (not more the the minimum needed by WordPress).

And if that is still not good enough the your best bet would be to create your own database table and only store what you need in it.

share|improve this answer
    
I would go one better and also use the status post format :) –  TheDeadMedic Jun 19 '11 at 15:18
    
and this can be done with raw php code only? I guess p2 should have considered of making something lite for update messages –  Xalloumokkelos Jun 19 '11 at 15:19
    
Yes this can be done in raw php but why? This is really the wrong place to look for optimization. Like thedeadmedic said, you'll get better results using some frontend cache mechanism. –  Bainternet Jun 19 '11 at 16:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.