You have a couple of issues with the code you are trying.
To check the query is for your CPT archive: You are using $query->is_post_type()
but it doesn’t work (as far as I know, its not even a function). Instead you can use either:
if (is_post_type_archive('business')) {...}
or (if its not only on the archive page)
if ($query->get('post_type') == 'business') {...}
To order by meta value in pre_get_posts, you need to set the meta_key
as well as the orderby
(and optionally order
).
Complete Function: Applying these to your “custom_special_sort” function, we get:
function custom_special_sort( $query ) {
// if is this the main query and is this post type of business
if ( $query->is_main_query() && is_post_type_archive( 'business' ) ) {
// order results by the meta_key 'featured_listing'
$query->set( 'meta_key', 'featured_listing' );
$query->set( 'orderby', 'featured_listing' );
$query->set( 'order', 'DESC' );
}
}
add_action( 'pre_get_posts', 'custom_special_sort' );