Filter Custom Taxonomy Posts

You’ve posted just the part of code that is responsible for getting the slider, I guess, so it’s a little bit hard to know, where exactly do you use it. But I assume that you use template hierarchy correctly and you use category archives.

If so, then you can get current term ID with get_queried_object_id() and use it in your query.

So here’s the code that should solve your problem:

<?php
global $taxonomy_location_url, $taxonomy_profile_url;

$args = array(
    'post_type' => $taxonomy_profile_url,
    'orderby' => 'rand',
    'meta_query' => array( array('key' => 'featured', 'value' => '1', 'compare' => '=', 'type' => 'NUMERIC') ),
    'posts_per_page' => get_option("slideritems"),
    'tax_query' => array( array( 'taxonomy' => '<YOUR TAXONOMY NAME>', 'terms' => get_queried_object_id() ) ),
);
$q = new WP_Query($args);

if ( $q->have_posts()) : 

while ( $q->have_posts() ) : $q->the_post();
    $category = wp_get_post_terms(get_the_ID(), $taxonomy_location_url);
    $linktitle = get_the_title();
    $imagealt = get_the_title();
    ...
endwhile;
wp_reset_postdata();
?>

All you have to do is to put your taxonomy name in there.

Also please notice, that I’ve changed query_posts to new WP_Query – it’s much nicer way to perform your custom queries, because you don’t overwrite the global query.