| @@ 623-639 (lines=17) @@ | ||
| 620 | } |
|
| 621 | $with_no_results = !empty($args['without_no_results']) ? false : true; |
|
| 622 | ||
| 623 | if (!empty($category) && isset($category[0]) && $category[0] != '0') { |
|
| 624 | $category_taxonomy = geodir_get_taxonomies($post_type); |
|
| 625 | ||
| 626 | ######### WPML ######### |
|
| 627 | if (function_exists('icl_object_id')) { |
|
| 628 | $category = gd_lang_object_ids($category, $category_taxonomy[0]); |
|
| 629 | } |
|
| 630 | ######### WPML ######### |
|
| 631 | ||
| 632 | $tax_query = array( |
|
| 633 | 'taxonomy' => $category_taxonomy[0], |
|
| 634 | 'field' => 'id', |
|
| 635 | 'terms' => $category |
|
| 636 | ); |
|
| 637 | ||
| 638 | $query_args['tax_query'] = array($tax_query); |
|
| 639 | } |
|
| 640 | ||
| 641 | if (!empty($tags)) { |
|
| 642 | // Clean tags |
|
| @@ 3725-3741 (lines=17) @@ | ||
| 3722 | } |
|
| 3723 | $with_no_results = ! empty( $instance['without_no_results'] ) ? false : true; |
|
| 3724 | ||
| 3725 | if ( ! empty( $category ) && $category[0] != '0' ) {
|
|
| 3726 | $category_taxonomy = geodir_get_taxonomies( $post_type ); |
|
| 3727 | ||
| 3728 | ######### WPML ######### |
|
| 3729 | if ( function_exists( 'icl_object_id' ) ) {
|
|
| 3730 | $category = gd_lang_object_ids( $category, $category_taxonomy[0] ); |
|
| 3731 | } |
|
| 3732 | ######### WPML ######### |
|
| 3733 | ||
| 3734 | $tax_query = array( |
|
| 3735 | 'taxonomy' => $category_taxonomy[0], |
|
| 3736 | 'field' => 'id', |
|
| 3737 | 'terms' => $category |
|
| 3738 | ); |
|
| 3739 | ||
| 3740 | $query_args['tax_query'] = array( $tax_query ); |
|
| 3741 | } |
|
| 3742 | ||
| 3743 | global $gridview_columns_widget, $geodir_is_widget_listing; |
|
| 3744 | ||