This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'propertyhive_search_form_fields_default', 'update_ph_search_form_fields', 10, 1 ); | |
function update_ph_search_form_fields($fields) | |
{ | |
$department_field = $fields['department']; | |
unset( $fields['department'] ); | |
$fields = array_reverse($fields, true); | |
$fields['address_keyword'] = array( | |
'type' => 'text', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="map_canvas" style="height:300px"></div> | |
<script src="http://maps.google.com/maps/api/js"></script> | |
<script> | |
var map; // Global declaration of the map | |
function initialize_map() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'propertyhive_search_form_fields_shortcode', 'edit_property_search_form_shortcode_fields', 1, 1 ); | |
function edit_property_search_form_shortcode_fields($form_fields) | |
{ | |
// Change the labels from 'Sales' and 'Lettings' to 'Buy' and 'Rent' | |
$form_fields['department']['options']['residential-sales'] = 'Buy'; | |
$form_fields['department']['options']['residential-lettings'] = 'Rent'; | |
$form_fields['address_keyword'] = array( | |
'type' => 'text', | |
'show_label' => false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Single Property Images | |
* | |
* @author PropertyHive | |
* @package PropertyHive/Templates | |
* @version 1.0.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Loop Summary | |
* | |
* @author PropertyHive | |
* @package PropertyHive/Templates | |
* @version 1.0.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Make enquiry action, plus lightbox form | |
* | |
* @author PropertyHive | |
* @package PropertyHive/Templates | |
* @version 1.0.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'ph_rtdf_send_request_data', 'set_as_student_property', 10, 2 ); | |
function set_as_student_property( $request_data, $post_id ) | |
{ | |
$request_data['property']['student_property'] = true; | |
return $request_data; | |
} | |
add_filter( 'ph_zoopla_rtdf_send_request_data', 'set_as_student_property_zoopla', 10, 2 ); | |
function set_as_student_property_zoopla( $request_data, $post_id ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'propertyhive_property_query', 'custom_field_property_filter' ); | |
function custom_field_property_filter( $q ){ | |
global $post; | |
if (is_post_type_archive( 'property' )) | |
{ | |
if ( isset($_GET['my_field']) && $_GET['my_field'] != '' ) // YOUR CRITERIA HERE | |
{ | |
$meta_query = $q->get( 'meta_query' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'init', 'show_map_by_default', 1 ); | |
function show_map_by_default() | |
{ | |
$_GET['view'] = 'map'; | |
} | |
add_action( 'init', 'maintain_property_list', 1 ); | |
function maintain_property_list() | |
{ | |
add_filter( 'propertyhive_show_results', create_function( '', 'return true;' ), 10 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Loop Price | |
* | |
* @author PropertyHive | |
* @package PropertyHive/Templates | |
* @version 1.0.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
OlderNewer