Does anybody understand how to specify an INCLUDE ONLY category using wordpress_get_archives? I must specify a category however list results by month.

I have attempted kwebble's wordpress plugin with no success. I have also found the next on Wordpress forums, however it seems to simply exclude groups. Possibly it may be modified to complete include? Even considering that, I am unsure the way i would refer to it as...

Thanks ahead of time!

add_filter( 'getarchives_where', 'customarchives_where' );
add_filter( 'getarchives_join', 'customarchives_join' );

function customarchives_join( $x ) {

    global $wpdb;

    return $x . " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)";

}

function customarchives_where( $x ) {

    global $wpdb;

    $exclude = '1'; // category id to exclude

    return $x . " AND $wpdb->term_taxonomy.taxonomy = 'category' AND $wpdb->term_taxonomy.term_id NOT IN ($exclude)";

Modifying that specific code is sort of simple ... it's all regulated within the last function's query:

function customarchives_where( $x ) {

    global $wpdb;

    $include = '1'; // category id to include

    return $x . " AND $wpdb->term_taxonomy.taxonomy = 'category' AND $wpdb->term_taxonomy.term_id IN ($include)";

It's only a matter of altering the $exclude to $include and omitting the "NOT" keyword within the return query. Instead of coming back everything but that category, it'll return only that category.