’; echo ‘’.__(“Select Category”).’’; foreach ( $categories as $category ) { echo ‘term_id.’”>’.$category->name.’’; } echo ‘’; } $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => -1, ‘post_status’ => ‘publish’, ); if(isset($_REQUEST[‘category_id’])){ $category_tag = array( ‘taxonomy’ => ‘product_cat’, ‘field’ => ‘id’, ‘terms’ => $tag, ); $args[‘tax_query’] = array ( $category_tag ); } $the_query = new WP_Query( $args ); echo ‘’; echo ‘’.__(“Select product”).’’; if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); echo ‘’.get_the_title().’’; } } echo ‘’; ?> Geplaatst op 31/03/2020door kennethCategorieën:Uncategorized