e.g. */ /* Plugin Name: Hacked WP Category Posts Plugin URI: http://cureless.net/works/scripts-doodles/hacked-wp-category-post-plugin/ Description: List the post date and contents in a specific category (modified from Brian Groce's code) Author: Mizielle Reonal Version: 1.0 Author URI: http://cureless.net/ */ function wp_cat_posts( $catID, $shownumber ) { global $wpdb; $get_posts_in_cat = "SELECT $wpdb->posts.ID, $wpdb->posts.post_title, $wpdb->posts.post_date, $wpdb->posts.post_content, "; $get_posts_in_cat .= "$wpdb->post2cat.post_id, $wpdb->post2cat.category_id "; $get_posts_in_cat .= "FROM $wpdb->posts, $wpdb->post2cat "; $get_posts_in_cat .= "WHERE $wpdb->posts.ID = $wpdb->post2cat.post_ID "; $get_posts_in_cat .= "AND $wpdb->post2cat.category_id = '$catID' "; $get_posts_in_cat .= "AND $wpdb->posts.post_status = 'publish' "; $get_posts_in_cat .= "ORDER BY $wpdb->posts.post_date DESC "; $get_posts_in_cat .= "LIMIT $shownumber "; $get_posts_in_cat_result = mysql_query($get_posts_in_cat); while ($posts_in_cat_row = mysql_fetch_assoc($get_posts_in_cat_result)) { $post_title = $posts_in_cat_row['post_title']; $postID = $posts_in_cat_row['ID']; $timestamp = $posts_in_cat_row['post_date']; $post_date = mysql2date('Y-m-d', $timestamp); $post_content = $posts_in_cat_row['post_content']; echo '