Author page: Comments and Ratings?

just to add to what Rarst answered, you can create Custom Post Type not to emulate Comments but as stub posts with no ui.

then to every Author on your site add a custom user metadata that will hold a post id of your newly made post type (one per each author) and in your author template before you call the comment loop\form set the global $post to that post id.

something like:

<?php
//save the true post id
$true_id = $post->ID;
// populate $post with the stub post
$author_post_id = get_user_meta($user_id, author_post_id,true);
query_posts("p=$author_post_id");
the_post();

//fool wordpress to think we are on a single post page
$wp_query->is_single = true;
//get comments
comments_template();
//reset wordpress to ture post
$wp_query->is_single = false;
query_posts("p=$true_id");
the_post();
?>

Now going back and updating all of your existing users could be a pain, but for newly create user you can create the stub post type id for user metadata on registration.

and you can use any rating plugin that is based on posts now that you have a post (you custom post type) associated with each author.

Hope this makes sense.
Ohad.

Leave a Comment