I modified the core code in version 1.2,1. Now all my custom code I am putting in a plugin. I am new to writing plugins. The below code must select posts by the current author. I also need categories and comment by current author.
function pref_posts_by_author() {
global $wpdb;
$user = wp_get_current_user();
$ID = (int) $user->ID;
$request = "SELECT * FROM $wpdb->posts
WHERE post_type = 'post' AND post_author = $ID
ORDER BY post_date DESC";
return apply_filters ('posts_request', $request);
}
apply_filters ('posts_request', pref_posts_by_author() );
Thanks for any help