I have a section in my dashboard called "services".
- I have 4 services
- I have 2 categories for these services: residential and commercial
- 2 of the 4 services have the category "residential", and the other 2 "commercial"
As it is now my services page is pulling up all 4 services.
Question: What code do I add, to show only the 2 services with the category of residential?
Here is my current code on the archive-service.php
page:
$paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : 1;
$args = array(
'post_type' => 'service',
'posts_per_page' => 8,
'paged' => $paged,
);
$wp_query = new WP_Query($args);
while($wp_query->have_posts()) : $wp_query->the_post();
WP_Query
Codex page has a list of all query parameters with examples of how to use them.