WordPress Plug-in Idea – Weekly Round-Ups

written by William Patton on April 6, 2012 in Uncategorized with no comments

I had an idea for an RSS poster. It gathers the weekly top posts and adds the title, post content from RSS and links to the post on the site. For example: use algorithm to check the top posts on kotaku every day. Cache the post from the RSS feed and then once a Week post the top rating content from the site onto my own site.

The code I found on WordPress.org is pretty strait forward, once I have all of the data I need cached I can parse it into what I want the post to say and look like then add it to the WordPress database using the following PHP code:

// Create post object
  $my_post = array(
     'post_title' => 'My post',
     'post_content' => 'This is my post.',
     'post_status' => 'publish',
     'post_author' => 1,
     'post_category' => array(8,39)
  );

// Insert the post into the database
  wp_insert_post( $my_post );