I'm tring to modify the main wp_get_archives() in order to request an author id and show their posts like in the main function.
I know the the_author_posts_link() is similar but I'd like to view archives like on the wp_get_archives() function.
So... I made some modifies to general-template.php:
$defaults = array( 'type' => 'monthly', 'limit' => '', 'format' => 'html', 'before' => '', 'after' => '', 'show_post_count' => false );
$curauth = get_userdata(get_query_var('author'));
2) I modified:
$where = apply_filters('getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r );
$where = apply_filters('getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish' AND post_author = " . $curauth->ID, $r );
3) I also added:
$url = $url . "&author=" . $curauth->ID;
$url = get_month_link($arcresult->year, $arcresult->month);
Ok everything seems to work, but the result page doesn't appear like an archive page, but just like a filtered main page.
How can I solve this?