Copy price categories to custom field
paste this code in you theme’s function.php file //get all categorie ID’s in to array $args = array( ‘child_of’ => 3678); // Parent category ID $categories = get_categories( $args ); $cat_array = array(); foreach ($categories as $category) { $cat_array[] = $category->term_id; } $Query_args = array( ‘category__in’ => $cat_array, ‘post_type’ => ‘YOUR_POST_TYPE_NAME’ ); $new_query = new … Read more