Answer moved from an edit in the answer to a real answer.
This is my query
<?php
$taxonomy = (get_post_type() == 'post' ? 'category' : (get_post_type() == 'news' || is_tax('news_categories') ? 'news_categories' : 'category'));
$tax_terms = get_terms($taxonomy, array('hide_empty'=> false) );
global $wp_query;
if( isset($_GET['s']) ):
$wp_query->is_search = true;
endif;
// var_dump($activeCategoryName = $wp_query->queried_object);
if(is_tax('news_categories')) {
$activeCategoryID = $wp_query->queried_object->term_id;
$allLink = get_bloginfo('url') . '/news';
$activeCategoryName = $wp_query->queried_object->name;
} elseif(is_category() || is_search()) {
$activeCategoryID = $wp_query->queried_object->term_id;
$activeCategoryName = $wp_query->queried_object->name;
$allLink = get_permalink(get_option('page_for_posts'));
} elseif (!is_search() && is_home()) {
$activeCategoryName="All Blog";
} elseif(!is_search() && is_post_type_archive('news') ) {
$activeCategoryName="All News";
}
?>
<ul>
<?php
?>
<li><a <?php echo ( !is_search() ? ( is_post_type_archive('news') || is_home() ? 'class="active_category"' : '' ) : '' ); ?> title="View all posts in news" href="https://wordpress.stackexchange.com/questions/136336/<?php echo $allLink; ?>">All</a></li>
<?php
foreach ($tax_terms as $tax_term) {
echo '<li><a ' . ($activeCategoryID == $tax_term->term_id ? 'class="active_category"' : '') . ' title="View all posts in ' . $tax_term->name . '" href="' . esc_attr(get_term_link($tax_term, $taxonomy)) . '">' . $tax_term->name . '</a></li>';
}
?>
</ul>
</div>
<div id='search' class="col-lg-3 col-md-3">
<?php get_search_form(); ?>
</div>
</div>
</div>
</section>
<div id='blog_listing'>
<div class="container">
<div class="row">
<!-- <h1><?php echo wp_title('', false); ?></h1> -->
<?php
if(!is_search()) {
?>
<h1>Currently Viewing <?php echo $activeCategoryName; ?> Articles</h1>
<?php
} else {
?>
<h1>Search Results for <?php echo get_search_query(); ?></h1>
<?php
}
?>
<?php
$postType = (is_home() ? 'post' : (is_post_type_archive('news') ? 'news' : 'post' ) );
$args = array(
'posts_per_page' => 6,
'post_type' => $postType,
);
$searchQuery = get_search_query();
if(!empty($searchQuery)) {
$args['s'] = $searchQuery;
};
if($postType == 'news') {
$args['news_categories'] = $activeCategoryID;
} elseif($postType == 'post') {
$args['cat'] = $activeCategoryID;
}
$wp_query = new WP_Query($args);
if ($wp_query->have_posts()) : while ($wp_query->have_posts()) : the_post();
$date = get_the_date();
$published_posts = $wp_query->found_posts;