<?php $properties_per_page = (int) estetico_get_setting('properties_per_page'); $start_page = isset($_GET['start_page']) ? (int) $_GET['start_page'] : 1; $sort_by = !empty($_GET['sort_by']) ? $_GET['sort_by'] : ''; $list_style = !empty($_GET['list_style']) ? $_GET['list_style'] : estetico_get_setting('properties_default_listing_type'); // Do the properties query $properties = PropertiesManager::getFiltered($_GET); $found_posts = PropertiesManager::getLastQueryFoundItemsCount(); ?> <div class="main-content"> <div class="filterbar"> <div class="listing-view-change"> <a href="<?php echo estetico_preserve_url(array('list_style' => 'grid')); ?> " class="grid<?php if ($list_style != 'grid') { ?> active<?php } ?> "><?php echo __('Grid', THEME_NAME); ?> </a> <a href="<?php echo estetico_preserve_url(array('list_style' => 'list')); ?> " class="list<?php
function estetico_properties_shortcode($atts) { extract(shortcode_atts(array(), $atts)); if ($atts['list_style'] == 'map') { $atts['all'] = true; } if ($atts['list_style'] == 'carousel') { extract(shortcode_atts(array('auto_slide' => !empty($atts['auto_slide']) && $atts['auto_slide'] == 'yes', 'infinite_loop' => !empty($atts['infinite_loop']) && $atts['infinite_loop'] == 'yes'), $atts)); } $properties = PropertiesManager::getFiltered($atts); $found_posts = PropertiesManager::getLastQueryFoundItemsCount(); $properties_per_page = (int) estetico_get_setting('properties_per_page'); $start_page = isset($_GET['start_page']) ? (int) $_GET['start_page'] : 1; extract($atts); $content = '<div class="properties-shortcode">'; ob_start(); require COMPONENTS_PATH . DIRECTORY_SEPARATOR . "common" . DIRECTORY_SEPARATOR . "properties.php"; $content .= ob_get_contents(); ob_end_clean(); $content .= '<div class="clearfix"></div></div>'; return $content; }