CMS Mastering Development Wordpress

How do I combine two categories into one template?

This is the code I have, I’m trying to add the ‘used-boat-2’ category so all of the used boats appear with all of the new boats on a new page template.

$the_query = new WP_Query(
        'post_type' => 'boat',
        'posts_per_page' => '-1',
        'tax_query' => array(
                'taxonomy' => 'boat-categories',
                'field' => 'slug',
                'terms' => 'new-boat-2'

if ($the_query->have_posts()) { ?>

Leave a Reply

Your email address will not be published. Required fields are marked *