| Server IP : 104.129.129.72 / Your IP : 216.73.216.229 Web Server : LiteSpeed System : Linux 123answers 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 User : answe8064 ( 1002) PHP Version : 8.2.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/123answers.ca/public_html/grandeprairie/wp-content/themes/directorytheme/ |
Upload File : |
<?php
/**
* The front page template file
*/
get_header();
/* check which banner option section is select
Screenshort : https://prnt.sc/1uch7lt*/
$cms = get_field('cust_bann_switcher','option');
$cbrbtn = get_field('custom_banner','option');
if( $cms == '1' ) {
if ($cbrbtn == 'bannerimage') {
get_template_part( 'template-parts/dt/front', 'banner' );
}
elseif ($cbrbtn == 'bannerslider') {
get_template_part( 'template-parts/dt/front', 'bannerslider' );
}
elseif ($cbrbtn == 'custommap') {
get_template_part( 'template-parts/dt/front', 'custommap' );
}
} else {
get_template_part( 'template-parts/dt/front', 'banner-map' );
}
global $wp_query;
$pgid = $wp_query->post->ID;
$frontpage_id = get_option( 'page_on_front' );
$search_listing = get_field('search_listing','option');
if($cms == 1 && $search_listing == 1){
echo '<style>div#cp-banner {margin-bottom:0px;}</style>';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
echo $abc = get_site_url().'/listings/';
if(isset($_POST['listing_keyword'])){
$listing_key = sanitize_text_field($_POST['listing_keyword']);
}
if(isset($_POST['add_listing_keyword1'])){
$add_listing_keyword1 = sanitize_text_field($_POST['add_listing_keyword1']);
}
if(isset($_POST['dropdown_category4'])){
$s_listing_category = sanitize_text_field($_POST['dropdown_category4']);
}
header( "Location:".$abc."?listing_keyword=".$listing_key."&add_listing_keyword1=".$add_listing_keyword1."&s_listing_category=".$s_listing_category);
}
?>
<section class="listing_search">
<div class="inner">
<form id="home_search" method="post">
<?php get_template_part( 'template-parts/dt/front', 'search-listing' ); ?>
</form>
</div>
</section>
<?php }
if(get_field('wc_title',$frontpage_id)) :
?>
<!--- welcome section of home page
Screenshort : https://prnt.sc/1uchsbw -->
<section class="cp-section welcome-section">
<div class="inner">
<div class="cp-title">
<h2><?php the_field('wc_title', $frontpage_id); ?></h2>
</div>
<div class="cp-entry-content text-center">
<?php the_field('wc_content', $frontpage_id); ?>
</div>
<div class="welcome-btn text-center">
<?php
if( get_field('button', $frontpage_id) ): ?>
<?php while( has_sub_field('button', $frontpage_id) ): ?>
<a href="<?php the_sub_field('url',$pgid); ?>"
class="global-btn
<?php if(get_sub_field('button_style',$pgid) =="Border"): ?> btn-solid <?php endif; ?>">
<?php the_sub_field('button_text', $frontpage_id); ?>
</a>
<?php endwhile;
endif; ?>
</div>
</div>
</section>
<?php endif;
if( !get_field('enable_featured_listing',$frontpage_id) ) get_template_part( 'template-parts/dt/front', 'featured' );
if( !get_field('enable_new_listing',$frontpage_id) ) get_template_part( 'template-parts/dt/front', 'listing' ); ?>
<script>
jQuery(document).mouseup(function(e) {
var container = jQuery(".gm-style-iw");
// if the target of the click isn't the container nor a descendant of the container
if (!container.is(e.target) && container.has(e.target).length === 0) jQuery('.gm-ui-hover-effect').click();
});
</script>
<?php
wp_enqueue_script( 'carousel', get_template_directory_uri() . '/js/owl.carousel.min.js?'.time(), array( 'jquery' ) );
wp_enqueue_script( 'jquery-ui', 'https://code.jquery.com/ui/1.13.1/jquery-ui.min.js?'.time(), array( 'jquery' ) );
get_footer();