ID;
global $wp_rewrite;
if ($wp_rewrite->using_permalinks()) {
$form->search_url = get_permalink($search_page_id);
$form->hidden_field = '';
} else {
$form->search_url = "index.php";
$form->hidden_field = "";
}
return $form;
}
/**
* For Building the Unstructured list on the search page
*/
function display_unstructured_list()
{
include('parts/unstructured_list.php');
}
/**
* When viewing a listing details page, grab the post data and make it available.
*/
function get_property_details()
{
global $post;
$listing = json_decode($post->post_content);
return $listing;
}
/**
* Registers the various sidebars for Allure
*/
function register_custom_sidebars()
{
// Footer Control For all Pages.
register_sidebar( array(
'name' => __( 'Allure Footer', 'allure' ),
'id' => 'allure-footer-widget-area',
'description' => __( 'These widgets will be displayed in the footer', 'allure' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
) );
// Footer Control For Search
register_sidebar( array(
'name' => __( 'Allure Search Sidebar', 'allure' ),
'id' => 'allure-search-widget-area',
'description' => __( 'These widgets will be displayed in the sidebar on the search page', 'allure' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
) );
// Sidebar control for all blog
register_sidebar( array(
'name' => __( 'Allure Blog Sidebar', 'allure' ),
'id' => 'allure-blog-widget-area',
'description' => __( 'These widgets will be displayed on the blog and all posts.', 'allure' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '
',
'after_title' => '
',
) );
// Sidebar Control For all Property Details.
register_sidebar( array(
'name' => __( 'Allure Property Details Sidebar', 'allure' ),
'id' => 'allure-details-widget-area',
'description' => __( 'These widgets will be displayed on all property details pages.', 'allure' ),
'before_widget' => '