Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Property search form
- *
- * @author PropertyHive
- * @package PropertyHive/Templates
- * @version 1.0.0
- */
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
- if ( is_post_type_archive('property') )
- {
- $department = get_option( 'propertyhive_primary_department' );
- if ( isset( $_REQUEST['department'] ) && $_REQUEST['department'] != '' )
- {
- $department = $_REQUEST['department'];
- }
- $department = str_replace('residential-', '', $department);
- echo do_shortcode('[property_search_form id="' . $department . '"]');
- }
- else
- {
- ?>
- <form name="ph_property_search" class="property-search-form property-search-form-<?php echo $id; ?> clear" action="<?php echo get_post_type_archive_link( 'property' ); ?>" method="get" role="form">
- <?php foreach ( $form_controls as $key => $field ) : ?>
- <?php ph_form_field( $key, $field ); ?>
- <?php endforeach; ?>
- <input type="submit" value="<?php _e( 'Search', 'propertyhive' ); ?>">
- </form>
- <?php } ?>
Add Comment
Please, Sign In to add comment