diff --git a/templates/elementor-templates/opalestate-agency-collection.php b/templates/elementor-templates/opalestate-agency-collection.php index 2ccea4a5..4ae9b95a 100755 --- a/templates/elementor-templates/opalestate-agency-collection.php +++ b/templates/elementor-templates/opalestate-agency-collection.php @@ -1,59 +1,62 @@ - get_settings_for_display(); - $layout = $settings['item_layout']; - $attrs = $this->get_render_attribute_string( 'wrapper-style' ); - if( isset($_GET['display']) && $_GET['display'] == 'grid' ){ - $layout = 'grid'; +get_settings_for_display(); +$layout = $settings['item_layout']; +$attrs = $this->get_render_attribute_string( 'wrapper-style' ); +if ( isset( $_GET['display'] ) && $_GET['display'] == 'grid' ) { + $layout = 'grid'; - }else if( isset($_GET['display']) && $_GET['display'] == 'list' ){ - $layout = 'list'; - $attrs = 'class="column-list"'; - } - $onlyfeatured = 0; - if( isset($_GET['s_agents']) ) { - $query = Opalestate_Agency_Query::get_agencies( array("posts_per_page"=>$limit, 'paged' => $paged), $onlyfeatured ); - } else { - $query = Opalestate_Agency_Query::get_search_agencies_query(); - } - - $rowcls = apply_filters('opalestate_row_container_class', 'opal-row'); +} elseif ( isset( $_GET['display'] ) && $_GET['display'] == 'list' ) { + $layout = 'list'; + $attrs = 'class="column-list"'; +} +$onlyfeatured = 0; +if ( isset( $_GET['s_agents'] ) ) { + $query = Opalestate_Agency_Query::get_agencies( [ "posts_per_page" => $limit, 'paged' => $paged ], $onlyfeatured ); +} else { + $query = Opalestate_Agency_Query::get_search_agencies_query(); +} + +$rowcls = apply_filters( 'opalestate_row_container_class', 'opal-row' ); ?> - - -