I'm trying to filter a loop by a custom field value. I've tried all of the suggestions on the site, but it just won't filter. This loop is being used for a custom template of an rss feed. It pulls together the custom post type and only the posts that are "published", but I can't get it to filter by custom field value.
$args = array_merge( $wp_query->query, array( 'post_type' => 'custom_type', 'post_status' => 'publish', 'meta_key' => 'my_custom_field', 'meta_value' => 'custom field value', ) );
query_posts( $args );
while( have_posts()) : the_post(); ?>