‘page’,
‘posts_per_page’ => -1,
);
if (!empty($page_category_filter)) {
$args[‘tax_query’] = array(
array(
‘taxonomy’ => ‘page_category’,
‘field’ => ‘slug’,
‘terms’ => $page_category_filter,
),
);
}
$query = new WP_Query($args);
// Loop through query results and display content
if ($query->have_posts()) :
while ($query->have_posts()) : $query->the_post();
// Display your post content here
endwhile;
wp_reset_postdata();
else :
echo ‘No results found.’;
endif;
?>