Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected function query_args( $type = '', $page = 1 ){
- $args = [
- 'post_type' => $this->post_type,
- 'paged' => $page,
- ];
- if( ! empty( $page ) ){
- $args ['tax_query' ] =[
- [
- 'taxonomy' => 'product_type',
- 'field' => 'slug',
- 'terms' => $type,
- ],
- ];
- }
- return $args;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement