<?php global $wp_query; $default_sort = aviators_settings_get_value('properties', 'properties', 'default_sort'); if (isset($_GET['filter_sort_by'])) { $default_sort = $_GET['filter_sort_by']; } echo View::render('archive-property.twig', array('wp_query' => aviators_properties_filter(TRUE), 'properties' => aviators_properties_filter(FALSE), 'default_sort' => $default_sort));
<?php define('WP_USE_THEMES', false); require_once '../../../../../../wp-load.php'; $properties = aviators_properties_filter(FALSE, FALSE); wp_send_json(array('count' => count($properties), 'contents' => View::render('properties/helpers/contents.twig', array('properties' => $properties)), 'locations' => View::render('properties/helpers/locations.twig', array('properties' => $properties)), 'types' => View::render('properties/helpers/types.twig', array('properties' => $properties))));