PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

We Upgraded So We Could Get Pagination, But It Won't Work

This support system is for all types of the plugins as for premium versions, so for free ones! If you have premium version do not forget in the private data of the request (!!not in the text of the support request!!) after its publishing insert purchase code please (see blue-green button on the right side) and press Save button.
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

We upgraded thinking that pagination would work...  We did all the suggestions at https://wp-filter.com/howto/pagination-doesn-work-what-to-do/ and  https://pluginus.net/support/topic/pagination-doesn-t-work/   Neither worked.  I assigned it to use the custom post types that we are using and set the Results per page to 2.  It still does them all.  I am not sure what to do.  If I share my template page code, would you be able to help me?

<code><?php

/*
* Template name: Yacht Sale Search
*/

get_header();
?>
<!--<script src="<?php echo get_stylesheet_directory_uri(); ?>/js/content-start.js"></script>-->
<link rel="stylesheet preload" as="style" href="<?php echo get_stylesheet_directory_uri(); ?>/css/yacht-styles.css">
<?php

/*$number_of_cabins = array();
$number_of_guests = array();*/
$yacht_sales_builder = array();
$year_of_built = array();
$yacht_sales_length = array();
$yacht_sale_price = array();
/*$yacht_sales_special_services = array();*/
$count_posts = array();

/*Yacht query*/

if( isset($_GET['Category']) && !empty($_GET['Category']) ) {
$cata_query = array(
'taxonomy' => 'yacht_sales_cats',
'field' => 'term_id',
'terms' => $_GET['Category'], // you need to know the term_id of your term "example 1"
);
}else{
$cata_query = '';
}

/*if( isset($_GET['Guests']) && !empty($_GET['Guests']) ) {
$number_of_guests_default = array(
'key' => 'number_of_guests',
'value' => $_GET['Guests'],
'compare' => '>=',
);
}else{
$number_of_guests_default = '';
}*/

if( isset($_GET['Company']) && !empty($_GET['Company']) ) {
$Company_default = array(
'key' => 'yacht_sale_builder',
'value' => $_GET['Company'],
'compare' => 'LIKE'
);
}else{
$Company_default = '';
}

/*if( isset($_GET['Cabins']) && !empty($_GET['Cabins']) ) {
$Cabins_default = array(
'key' => 'number_of_cabins',
'value' => $_GET['Cabins'],
'compare' => 'IN'
);
}else{
$Cabins_default = '';
}*/

/*if( isset($_GET['Term']) ) {
$_GET['Term'] = $_GET['Term'];
}else {
$_GET['Term'] = '';
}*/

/*Query args*/

$searchQuery_default = '';
if(isset($_GET['searchQuery'])) {
$searchQuery_default = $_GET['searchQuery'];
}
/*if(isset($_GET['Term'])){
$default_term = $_GET['Term'];
}else {
$default_term = '';
}*/
if( $searchQuery_default != 'true' /*&& $default_term == ''*/ ){

$args_default = array(
'post_type' => 'yacht_sales',
'posts_per_page' => -1,
);

}else {

$args_default = array(
'post_type' => 'yacht_sales',
'posts_per_page' => -1,
//'s' => ''.$_GET['Term'].'',
'meta_query' => array(

/*$number_of_guests_default,

$Cabins_default,*/
$Company_default,

),
'tax_query' => array(
$cata_query
),
);

}

$yacht_sales_default = new WP_Query($args_default);

/*Yacht query end*/

$posts_count = 0;
while($yacht_sales_default->have_posts()){
$yacht_sales_default->the_post();

$count_posts[] = $posts_count;

/*$number_of_cabins[] = get_post_meta(get_the_id(), 'number_of_cabins', true );
$number_of_guests[] = get_post_meta(get_the_id(), 'number_of_guests', true );*/
$yacht_sales_builder[] = get_post_meta(get_the_id(), 'yacht_sale_builder', true );
$year_of_built[] = get_post_meta(get_the_id(), 'year_of_built', true );
$yacht_sales_length[] = get_post_meta(get_the_id(), 'yacht_sale_length', true );
$yacht_sale_price[] = get_post_meta(get_the_id(), 'yacht_sale_price', true );
/*$yacht_sales_special_services[] = get_post_meta(get_the_id(), 'yacht_sales_special_services', true );*/

$posts_count++;
}
// print_r($year_of_built);
//print_r( $yacht_sales_pecial_services[1] );

?>
<div class="MiddleColumn">
<div class="Padding">
<div id="NotificationsContainer"></div>

<div class="SearchBlock" style="display: block;">
<form id="yachts_search" action="">
<div class="container">
<div class="row">
<div class="col-sm-2 col-md-2">
<img src="https://www.ycs.gr/search_icon_white.png" class="img-responsive">

<div class="NumOfResults"><?php echo count($count_posts); ?> Yachts</div>
</div>

<div class="col-sm-10 col-md-10">
<input type="hidden" name="searchQuery" value="true">
<?php /*<div class="col-sm-12 col-md-12">
<input type="hidden" name="searchQuery" value="true">
<div class="MainInput"><input type="text" id="SearchTerm" name="Term" value="" placeholder="Type yacht name"></div>
</div>*/ ?>

<div class="col-sm-12 col-md-12">
<div class="row">
<div class="col-sm-6 col-md-6">
<div class="FiltersBox Filter_Categories Box">
<div class="FilterBoxTitle BoxTitle">
<span>Type</span>
</div>
<div class="FiltersContent BoxContent" id="DataCategories">
<select class="FilterSelect bs-select-hidden" multiple="" data-width="100%" title="Type" name="Category[]">
<?php
$taxonomies = get_terms( array(
'taxonomy' => 'yacht_sales_cats',
'hide_empty' => false
) );

if ( !empty($taxonomies) ) :

foreach( $taxonomies as $category ) {

/*echo '<option value="'. esc_attr( $category->term_id ) .'" '.selected( esc_attr( $category->term_id), $_GET['Category'] ).'>
'. esc_html( $category->name ) .'</option>';*/
?>
<option value="<?php echo esc_attr( $category->term_id ); ?>" <?php if( in_array( $category->term_id, $_GET['Category'] ) ){ echo 'selected'; } ?>><?php echo esc_html( $category->name ); ?></option>
<?php
}

endif;
?>
</select>

</div>
</div>
</div>
<div class="col-sm-6 col-md-6">
<div class="FiltersBox Filter_Company Box Active">
<div class="FilterBoxTitle BoxTitle">
<span>Builder</span>
</div>
<div class="FiltersContent BoxContent">
<select class="FilterSelect bs-select-hidden" data-width="100%" multiple="multiple" title="Builder" name="Company[]">
<?php
/* $builders = array();
$builders = array_unique( $yacht_sales_builder);*/

$builders = array();

if( isset($_GET['Category']) && !empty($_GET['Category']) ) {
$cata_query_builders = array(
'taxonomy' => 'yacht_sales_cats',
'field' => 'term_id',
'terms' => $_GET['Category'], // you need to know the term_id of your term "example 1"
);
}else{
$cata_query_builders = '';
}

$args_builders = array(
'post_type' => 'yacht_sales',
'posts_per_page' => -1,
'tax_query' => array(
$cata_query_builders
),
);
$cabins_builders = new WP_Query($args_builders);
while( $cabins_builders->have_posts() ){
$cabins_builders->the_post();
$number_of_builders_all[] = get_post_meta(get_the_id(), 'yacht_sale_builder', true );
}wp_reset_postdata();

if( isset($_GET['Company']) && !empty($_GET['Company']) ){
$builders_array = $_GET['Company'];
}else {
$builders_array = array();
}

$builders_all = array_unique( $number_of_builders_all);

foreach($builders_all as $builder) {

if( !empty($builder) ){
?>
<option title="<?php echo $builder; ?>" value="<?php echo $builder; ?>" <?php if(in_array( $builder, $_GET['Company'] )){ echo 'selected';} ?>><?php echo $builder; ?></option>
<?php
}
}
?>
</select>

</div>
</div>

<script>
jQuery(document).ready(function() {
jQuery('.FilterSelect').change(function() {
jQuery('.MiddleColumn .Padding').addClass('blur');
jQuery('#yachts_search').submit();
});
});
</script>
</div>
<?php /*<div class="col-sm-6 col-md-6">
<div class="FiltersBox Filter_Guests Box Active">
<div class="FilterBoxTitle BoxTitle">
<span>Guests Cruising</span>
</div>
<div class="FiltersContent BoxContent">
<select class="FilterSelect bs-select-hidden" data-width="100%" title="Guests Cruising" name="Guests">
<?php
$guests = array();

if( isset($_GET['Category']) && !empty($_GET['Category']) ) {
$cata_query_guests = array(
'taxonomy' => 'yacht_sales_cats',
'field' => 'term_id',
'terms' => $_GET['Category'], // you need to know the term_id of your term "example 1"
);
}else{
$cata_query_guests = '';
}

$args_guests = array(
'post_type' => 'yacht_sales',
'posts_per_page' => -1,
'tax_query' => array(
$cata_query_guests
),
);
$guests_posts = new WP_Query($args_guests);
while( $guests_posts->have_posts() ){
$guests_posts->the_post();
$number_of_guests_all[] = get_post_meta(get_the_id(), 'number_of_guests', true );
}wp_reset_postdata();

if( isset($_GET['Guests']) && !empty($_GET['Guests']) ){
$guests_array = $_GET['Guests'];
}else {
$guests_array = array();
echo '<option title="Guests" value="" >Guests</option>';
}

$guests = array_unique( $number_of_guests_all);
$guests_test = $guests;
// $guests = array_unique( $number_of_guests);
asort($guests);
foreach($guests as $guest){
?>
<option title="<?php echo $guest; ?> Guests" value="<?php echo $guest; ?>" <?php if( isset($_GET['Guests']) && $_GET['Guests'] == $guest ){ echo 'selected';} ?>><?php echo $guest; ?></option>
<?php
}
?>
</select>

</div>
</div>

<script>
jQuery(document).ready(function() {
jQuery('.FilterSelect').change(function() {
jQuery('.MiddleColumn .Padding').addClass('blur');
jQuery('#yachts_search').submit();
});
});
</script>
</div>
<div class="col-sm-6 col-md-6">
<div class="FiltersBox Filter_Cabins Box Active">
<div class="FilterBoxTitle BoxTitle">
<span>Cabins</span>
</div>
<div class="FiltersContent BoxContent">
<select class="FilterSelect bs-select-hidden" data-width="100%" multiple="multiple" title="Cabins" name="Cabins[]">
<?php
$cabins = array();

if( isset($_GET['Category']) && !empty($_GET['Category']) ) {
$cata_query_cabins = array(
'taxonomy' => 'yacht_sales_cats',
'field' => 'term_id',
'terms' => $_GET['Category'], // you need to know the term_id of your term "example 1"
);
}else{
$cata_query_cabins = '';
}

$args_cabins = array(
'post_type' => 'yacht_sales',
'posts_per_page' => -1,
'tax_query' => array(
$cata_query_cabins
),
);
$cabins_posts = new WP_Query($args_cabins);
while( $cabins_posts->have_posts() ){
$cabins_posts->the_post();
$number_of_cabins_all[] = get_post_meta(get_the_id(), 'number_of_cabins', true );
}wp_reset_postdata();

if( isset($_GET['Cabins']) && !empty($_GET['Cabins']) ){
$cabins_array = $_GET['Cabins'];
}else {
$cabins_array = array();
}

$cabins_all = array_unique( $number_of_cabins_all);
asort($cabins_all);
foreach( $cabins_all as $cabin ) {
?>
<option title="<?php echo $cabin; ?> Cabins" value="<?php echo esc_attr($cabin); ?>" <?php if(in_array( $cabin, $cabins_array )){ echo 'selected';} ?>><?php echo $cabin; ?></option>
<?php } ?>
</select>

</div>
</div>

<script>
jQuery(document).ready(function() {
jQuery('.FilterSelect').change(function() {
jQuery('.MiddleColumn .Padding').addClass('blur');
jQuery('#yachts_search').submit();
});
});
</script>
</div>*/ ?>
<div class="col-sm-6 col-md-6">
<div class="FiltersBox Filter_Price Box Active">
<div class="BoxTitle FilterBoxTitle">
Price
</div>
<div class="FiltersContent BoxContent">
<div class="clear"></div>
<div class="Range ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" id="PriceRange">
<div class="ui-slider-range ui-widget-header ui-corner-all" style="left: 0%; width: 100%;"></div><span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0" style="left: 0%;"></span><span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0" style="left: 100%;"></span>
</div>
<input type="hidden" name="minPrice" id="minPrice" value="<?php if($_GET['minPrice'] == ''){ echo min($yacht_sale_price); }else{echo $_GET['minPrice'];} ?>">
<input type="hidden" name="maxPrice" id="maxPrice" value="<?php if($_GET['maxPrice'] == ''){ echo max($yacht_sale_price); }else{echo $_GET['maxPrice'];} ?>">
<div class="clear"></div>

<div class="Amount" id="PriceAmount"><span class="from"><?php if($_GET['minPrice'] == ''){ echo min($yacht_sale_price); }else{echo $_GET['minPrice'];} ?>€</span> ... <span class="to"><?php if($_GET['maxPrice'] == ''){ echo max($yacht_sale_price); }else {echo $_GET['maxPrice']; } ?>€</span></div>
<div class="clear"></div>

</div>
</div>

<script >
jQuery(function() {
jQuery("#PriceRange").slider({
range: true,
step: 10,
min: <?php echo min($yacht_sale_price); ?>,
max: <?php echo max($yacht_sale_price); ?>,
values: [<?php if($_GET['minPrice'] == ''){ echo min($yacht_sale_price); }else{echo $_GET['minPrice'];} ?>, <?php if($_GET['maxPrice'] == ''){ echo max($yacht_sale_price); }else{echo $_GET['maxPrice'];} ?>],
slide: function(event, ui) {
jQuery("#PriceAmount").html("<span class='from'>" + ui.values[0].toFixed(3) + "€</span> ... " + "<span class='to'>" + ui.values[1].toFixed(3) + "€</span>");
},
stop: function(event, ui) {
var url = "";
jQuery("#PriceAmount").html("<span class='from'>" + ui.values[0].toFixed(3) + "€</span> ... " + "<span class='to'>" + ui.values[1].toFixed(3) + "€</span>");
jQuery("input#minPrice").val(ui.values[0].toFixed(3));
jQuery("input#maxPrice").val(ui.values[1].toFixed(3));
/*if(url.indexOf('?') === -1)
location.href="/81/Motor-Yachts/?Price[]="+ui.values[0]+'-'+ui.values[1];
else
location.href="/81/Motor-Yachts/&Price[]="+ui.values[0]+'-'+ui.values[1];
*/
jQuery("#yachts_search").submit();
}
});

jQuery("#PriceAmount").html("<span class='from'>" + jQuery("#PriceRange").slider("values", 0).toFixed(0) + "€</span> ... " + "<span class='to'>" + jQuery("#PriceRange").slider("values", 1).toFixed(0) + "€</span>");
});
</script>
</div>
<div class="col-sm-6 col-md-6">
<div class="FiltersBox Filter_BuiltYear Box Active">
<div class="BoxTitle FilterBoxTitle">
Year Built
</div>
<div class="FiltersContent BoxContent">
<div class="clear"></div>
<div class="Range ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" id="BuiltYearRange">
<div class="ui-slider-range ui-widget-header ui-corner-all" style="left: 0%; width: 100%;"></div><span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0" style="left: 0%;"></span><span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0" style="left: 100%;"></span>
</div>
<input type="hidden" name="minBuiltYear" id="minBuiltYear" value="<?php if($_GET['minBuiltYear'] == ''){ echo min($year_of_built); }else{ echo $_GET['minBuiltYear']; } ?>">
<input type="hidden" name="maxBuiltYear" id="maxBuiltYear" value="<?php if($_GET['maxBuiltYear'] == ''){ echo max($year_of_built); }else{ echo $_GET['maxBuiltYear']; } ?>">
<div class="clear"></div>
<div class="Amount" id="BuiltYearAmount"><span class="from"><?php if($_GET['minBuiltYear'] == ''){ echo min($year_of_built); }else{ echo $_GET['minBuiltYear']; } ?></span> ... <span class="to"><?php if($_GET['maxBuiltYear'] == ''){ echo max($year_of_built); }else{ echo $_GET['maxBuiltYear']; } ?></span></div>
<div class="clear"></div>
</div>
</div>

<script >
jQuery(function() {
jQuery("#BuiltYearRange").slider({
range: true,
step: 1,
min: <?php echo min($year_of_built); ?>,
max: <?php echo max($year_of_built); ?>,
values: [<?php if($_GET['minBuiltYear'] == ''){ echo min($year_of_built); }else{ echo $_GET['minBuiltYear']; } ?>, <?php if($_GET['maxBuiltYear'] == ''){ echo max($year_of_built); }else{ echo $_GET['maxBuiltYear']; } ?>],
slide: function(event, ui) {
jQuery("#BuiltYearAmount").html("<span class='from'>" + ui.values[0].formatMoney(0, ",", 1 > 2 ? "." : "") + "</span> ... " + "<span class='to'>" + ui.values[1].formatMoney(0, ",", 1 > 2 ? "." : "") + "</span>");
},
stop: function(event, ui) {
var url = "";
jQuery("#BuiltYearAmount").html("<span class='from'>" + ui.values[0].formatMoney(0, ",", 1 > 2 ? "." : "") + "</span> ... " + "<span class='to'>" + ui.values[1].formatMoney(0, ",", 1 > 2 ? "." : "") + "</span>");
jQuery("input#minBuiltYear").val(ui.values[0]);
jQuery("input#maxBuiltYear").val(ui.values[1]);
/*if(url.indexOf('?') === -1)
location.href="/81/Motor-Yachts/?BuiltYear[]="+ui.values[0]+'-'+ui.values[1];
else
location.href="/81/Motor-Yachts/&BuiltYear[]="+ui.values[0]+'-'+ui.values[1];
*/
jQuery("#yachts_search").submit();
}
});

jQuery("#BuiltYearAmount").html("<span class='from'>" + jQuery("#BuiltYearRange").slider("values", 0).formatMoney(0, ",", 1 > 2 ? "." : "") + "</span> ... " + "<span class='to'>" + jQuery("#BuiltYearRange").slider("values", 1).formatMoney(0, ",", 1 > 2 ? "." : "") + "</span>");
});
</script>
</div>

<div class="col-sm-6 col-md-6">
<div class="FiltersBox Filter_YearLength Box Active">
<div class="BoxTitle FilterBoxTitle">
Length
</div>
<div class="FiltersContent BoxContent">
<div class="clear"></div>
<div class="Range ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all" id="YearLengthRange">
<div class="ui-slider-range ui-widget-header ui-corner-all" style="left: 0%; width: 100%;"></div><span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0" style="left: 0%;"></span><span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0" style="left: 100%;"></span>
</div>
<input type="hidden" name="minYearLength" id="minYearLength" value="<?php if( $_GET['minYearLength'] == '' ){ echo floor( min($yacht_sales_length) ); } else { echo $_GET['minYearLength']; } //echo floor( min($yacht_sales_length) ); ?>">
<input type="hidden" name="maxYearLength" id="maxYearLength" value="<?php if( $_GET['maxYearLength'] == '' ){ echo ceil( max($yacht_sales_length) ); } else { echo $_GET['maxYearLength']; } //echo ceil( max($yacht_sales_length) ); ?>">
<div class="clear"></div>
<div class="Amount" id="YearLengthAmount"><span class="from"><?php echo floor( min($yacht_sales_length) ); ?></span> ... <span class="to"><?php echo floor( max($yacht_sales_length) ); ?></span></div>
<div class="clear"></div>
</div>
</div>

<script >
jQuery(function() {
jQuery("#YearLengthRange").slider({
range: true,
step: 1,
min: <?php echo floor( min($yacht_sales_length) ); ?>,
max: <?php echo ceil( max($yacht_sales_length) ); ?>,
values: [<?php if( $_GET['minYearLength'] == '' ){ echo floor( min($yacht_sales_length) ); } else { echo $_GET['minYearLength']; } ?>, <?php if( $_GET['maxYearLength'] == '' ){ echo ceil( max($yacht_sales_length) ); } else { echo $_GET['maxYearLength']; } ?>],
slide: function(event, ui) {
var feet_min = Math.floor(ui.values[0].formatMoney(0, ",", 1 > 2 ? "." : "") * 3.28);
var feet_max = Math.floor(ui.values[1].formatMoney(0, ",", 1 > 2 ? "." : "") * 3.28);
jQuery("#YearLengthAmount").html("<span class='from'>" + ui.values[0].formatMoney(0, ",", 1 > 2 ? "." : "") + " m</span> ... " + "<span class='to'>" + ui.values[1].formatMoney(0, ",", 1 > 2 ? "." : "") + " m</span> <span style='margin-left: 15px;'>(" + feet_min + " ft ... " + feet_max + " ft)</span>");
},
stop: function(event, ui) {
var url = "";
var feet_min = Math.floor(ui.values[0].formatMoney(0, ",", 1 > 2 ? "." : "") * 3.28);
var feet_max = Math.floor(ui.values[1].formatMoney(0, ",", 1 > 2 ? "." : "") * 3.28);
jQuery("#YearLengthAmount").html("<span class='from'>" + ui.values[0].formatMoney(0, ",", 1 > 2 ? "." : "") + " m</span> ... " + "<span class='to'>" + ui.values[1].formatMoney(0, ",", 1 > 2 ? "." : "") + " m</span> <span style='margin-left: 15px;'>(" + feet_min + " ft ... " + feet_max + " ft)</span>");
jQuery("input#minYearLength").val(ui.values[0]);
jQuery("input#maxYearLength").val(ui.values[1]);
/*if(url.indexOf('?') === -1)
location.href="/81/Motor-Yachts/?BuiltYear[]="+ui.values[0]+'-'+ui.values[1];
else
location.href="/81/Motor-Yachts/&BuiltYear[]="+ui.values[0]+'-'+ui.values[1];
*/
jQuery("#yachts_search").submit();
}
});

var feet_min = Math.floor(jQuery("#YearLengthRange").slider("values", 0).formatMoney(0, ",", 1 > 2 ? "." : "") * 3.28);
var feet_max = Math.floor(jQuery("#YearLengthRange").slider("values", 1).formatMoney(0, ",", 1 > 2 ? "." : "") * 3.28);

jQuery("#YearLengthAmount").html("<span class='from'>" + jQuery("#YearLengthRange").slider("values", 0).formatMoney(0, ",", 1 > 2 ? "." : "") + " m</span> ... " + "<span class='to'>" + jQuery("#YearLengthRange").slider("values", 1).formatMoney(0, ",", 1 > 2 ? "." : "") + " m</span> <span style='margin-left: 15px;'>("+feet_min+" ft ... "+feet_max+" ft)</span>");
});
</script>
</div>
<div class="col-sm-6 col-md-6">
<div class="ClearButton" style="float: left; margin-left: 40%;">
<a class="button_effect" title="Reset" href="?"><span>Reset</span></a>
</div>
</div>

</div>

</div>
<?php /*<div class="col-sm-12 col-md-6">
<div class="AttributeFilters">
<div class="FiltersBox Filter_1 Box">
<div class="FilterBoxTitle BoxTitle">
<span>Special Services</span>

</div>
<div class="FiltersContent BoxContent" id="Data1">
<ul class="row">
<?php
$special_services = array();
$special_services = $yacht_sales_special_services;
$special_service_items = array();

foreach($special_services as $special_service) {

foreach( array_unique($special_service) as $special_service_item){
$special_service_items[] = $special_service_item;
}
}

foreach( array_unique($special_service_items) as $special_service_final_item ){
//echo $special_service_final_item;
?>
<li class="ValueId_1 <?php if(in_array( $special_service_final_item, $_GET['SpecialServices'] )){ echo 'Active'; }else { echo 'InActive'; } ?> col-sm-6">
<a href="#" title="Special Services - Deck Jacuzzi">
<input style="display:none;" type="checkbox" name="SpecialServices[]" value="<?php echo esc_attr($special_service_final_item); ?>" <?php if(in_array( $special_service_final_item, $_GET['SpecialServices'] )){ echo 'checked'; } ?>>
<span class="Title">
<?php
if($special_service_final_item == 1){
echo 'Deck Jacuzzi';
}elseif($special_service_final_item == 2){
echo 'Gym/exercice equipment';
}elseif($special_service_final_item == 3){
echo 'Master cabin on main deck';
}elseif($special_service_final_item == 4){
echo 'Stabilizers / Anchor';
}
?>

</span>
</a>

</li>

<?php
}
?>

</ul>
</div>
</div>
</div>

<script>
jQuery('.AttributeFilters ul li a').click(function(e) {
e.preventDefault();
jQuery(this).parent().toggleClass('Active');
jQuery(this).find('input').prop("checked", !jQuery(this).find('input').prop("checked"));
jQuery('#yachts_search').submit();
})
</script>
</div>*/ ?>

</div>
</div>
</div>
</form>
</div>

<script>
jQuery(document).ready(function() {
function insertParam(key, value) {
key = encodeURI(key);
value = encodeURI(value);

var kvp = document.location.search.substr(1).split('&');

var i = kvp.length;
var x;
while (i--) {
x = kvp[i].split('=');

if (x[0] == key) {
x[1] = value;
kvp[i] = x.join('=');
break;
}
}

if (i < 0) {
kvp[kvp.length] = [key, value].join('=');
}

//this will reload the page, it's likely better to store this until finished
document.location.search = kvp.join('&');
}

jQuery('#SearchTerm').delay({
delay: 500,
event: 'keyup',
fn: function() {
jQuery('.MiddleColumn').addClass('blur');
insertParam('Term', jQuery('#SearchTerm').val());
//window.location.href = window.location.href+'?Term='+;
}
});
});
</script>
<div class="navigation">
<div class="YachtsList">
<ul id="grid" class="row no-padding grid effect-2" style="position: relative; height: 515.634px; perspective-origin: 50% 457px;">
<?php

if( isset( $_GET['minPrice'] ) && !empty($_GET['minPrice']) ) {
$minPrice = $_GET['minPrice'];
}else {
$minPrice = 0;
}
if( isset( $_GET['maxPrice'] ) && !empty($_GET['maxPrice']) ) {
$maxPrice = $_GET['maxPrice'];
}else {
$maxPrice = 9999999999999;
}

if( isset($_GET['minYearLength']) && !empty($_GET['minYearLength']) ) {
$minYearLength = $_GET['minYearLength'];
}else{
$minYearLength = 0;
}

if( isset($_GET['maxYearLength']) && !empty($_GET['maxYearLength']) ) {
$maxYearLength = $_GET['maxYearLength'];
}else{
$maxYearLength = 9999999999999;
}

if( isset($_GET['minBuiltYear']) && !empty($_GET['minBuiltYear']) ) {
$minBuiltYear = $_GET['minBuiltYear'];
}else{
$minBuiltYear = 0;
}

if( isset($_GET['maxBuiltYear']) && !empty($_GET['maxBuiltYear']) ) {
$maxBuiltYear = $_GET['maxBuiltYear'];
}else{
$maxBuiltYear = 9999999999999;
}
$cata_query = null;
$cata_query = '';
if( isset($_GET['Category']) && !empty($_GET['Category']) ) {
$cata_query = array(
'taxonomy' => 'yacht_sales_cats',
'field' => 'term_id',
'terms' => $_GET['Category'], // you need to know the term_id of your term "example 1"
);
}else{
$cata_query = '';
}

/* if( isset($_GET['Guests']) && !empty($_GET['Guests']) ) {
$array_guests_check = array();
foreach( $guests_test AS $key => $value ){
if( $value >= $_GET['Guests'] ){
$array_guests_check[] = $value;
}
}
$number_of_guests = array(
'key' => 'number_of_guests',
'value' => $array_guests_check,
'compare' => 'IN'
);
}else{
$number_of_guests = '';
}*/
if( isset($_GET['Company']) && !empty($_GET['Company']) ) {
$Company = array(
'key' => 'yacht_sale_builder',
'value' => $_GET['Company'],
'compare' => 'IN'
);
}else{
$Company = '';
}
/*if( isset($_GET['Cabins']) && !empty($_GET['Cabins']) ) {
$Cabins = array(
'key' => 'number_of_cabins',
'value' => $_GET['Cabins'],
'compare' => 'IN'
);
}else{
$Cabins = '';
}*/

/*if( isset($_GET['Term']) ) {
$_GET['Term'] = $_GET['Term'];
}else {
$_GET['Term'] = '';
}*/

$searchQuery_default = null;
//$default_term = null;
if(isset($_GET['searchQuery'])) {
$searchQuery_default = $_GET['searchQuery'];
}
/*if(isset($_GET['Term'])){
$default_term = $_GET['Term'];
}else {
$default_term = '';
}*/
if( $searchQuery_default != 'true' /*&& $default_term == ''*/ ){

$args = array(
'post_type' => 'yacht_sales',
'posts_per_page' => -1,
);

}else {
$args = array(
'post_type' => 'yacht_sales',
'posts_per_page' => -1,
//'s' => ''.$_GET['Term'].'',
'meta_query' => array(

//$number_of_guests,
$Company,
/*$Cabins,*/

),
'tax_query' => array(
$cata_query
),
);

}

$yacht_sales = new WP_Query($args);

$searchQuery = '';
if(isset($_GET['searchQuery'])) {
$searchQuery = $_GET['searchQuery'];
}
if( $searchQuery != 'true' /*&& $_GET['Term'] == ''*/ ){
//$yacht_sales->have_posts()
while($yacht_sales->have_posts()){
$yacht_sales->the_post();

?>
<li class="p col-lg-4 col-md-6 col-sm-6 col-xs-12 shown" style="position: absolute; left: 0px; top: 0px;">
<div class="Yacht">

<div class="Photo">
<a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"><img class="img-responsive" src="<?php the_post_thumbnail_url(); ?>" alt="<?php the_title(); ?>"></a>
</div>

<div class="Details">
<a class="Cover" title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"></a>
<div class="DetailsContent">
<h3 class="Title" style="transform: translate3d(0px, 0px, 0px);"><a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="Description" style="transform: translate3d(0px, 0px, 0px);"><?php echo get_field( "yacht_sale_price" ); ?> € | Length (m): <?php $yacht_sale_length = get_field( "yacht_sale_length" ); $feet = 0.3048;
$yacht_sale_length_feet = $yacht_sale_length / $feet; ?><?php echo $yacht_sale_length . ' m (' . round($yacht_sale_length_feet, 0) . ' ft)'; ?></div>
<div class="DescriptionMore" style="transform: translate3d(0px, 0px, 0px);">Price: <?php echo get_field( "yacht_sale_price" ); ?> € |
<?php
$terms = wp_get_post_terms( get_the_ID(), 'yacht_sales_cats');
foreach ($terms as $t) {
echo $t->name;
} ?><br>
Year built: <?php echo get_field( "year_of_built" ); ?> | Length (m): <?php $yacht_sale_length = get_field( "yacht_sale_length" ); $feet = 0.3048;
$yacht_sale_length_feet = $yacht_sale_length / $feet; ?><?php echo $yacht_sale_length . ' m (' . round($yacht_sale_length_feet, 0) . ' ft)'; ?></div>
</div>
</div>
</div>
</li>

<?php
}
}else {

//$yacht_sales->have_posts()
while( $yacht_sales->have_posts() ){
$yacht_sales->the_post();
$yacht_sale_price = get_post_meta(get_the_id(), 'yacht_sale_price', true );
$yacht_sales_length = get_post_meta(get_the_id(), 'yacht_sale_length', true );
$year_of_built = get_post_meta(get_the_id(), 'year_of_built', true );
//$exp_yacht_sales_length = explode(' ', $yacht_sales_length);
//if( !isset($minPrice) && !empty($minPrice) ) return;

if( $minPrice <= $yacht_sale_price && $maxPrice >= $yacht_sale_price ) {
if( $minYearLength <= $yacht_sales_length && $maxYearLength >= $yacht_sales_length ) {
if( $minBuiltYear <= $year_of_built && $maxBuiltYear >= $year_of_built ) {
?>
<li class="q col-lg-4 col-md-6 col-sm-6 col-xs-12 shown" style="position: absolute; left: 0px; top: 0px;">
<div class="Yacht">

<div class="Photo">
<a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"><img class="img-responsive" src="<?php the_post_thumbnail_url(); ?>" alt="<?php the_title(); ?>"></a>
</div>

<div class="Details">
<a class="Cover" title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"></a>
<div class="DetailsContent">
<h3 class="Title" style="transform: translate3d(0px, 0px, 0px);"><a title="<?php the_title(); ?>" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="Description" style="transform: translate3d(0px, 0px, 0px);"><?php echo get_field( "yacht_sale_price" ); ?> € | Length (m): <?php $yacht_sale_length = get_field( "yacht_sale_length" ); $feet = 0.3048;
$yacht_sale_length_feet = $yacht_sale_length / $feet; ?><?php echo $yacht_sale_length . ' m (' . round($yacht_sale_length_feet, 0) . ' ft)'; ?></div>
<div class="DescriptionMore" style="transform: translate3d(0px, 0px, 0px);">Price <?php echo get_field( "yacht_sale_price" ); ?> € |
<?php
$terms = wp_get_post_terms( get_the_ID(), 'yacht_sales_cats');
foreach ($terms as $t) {
echo $t->name;
} ?><br>
Year built: <?php echo get_field( "year_of_built" ); ?> | Length (m): <?php $yacht_sale_length = get_field( "yacht_sale_length" ); $feet = 0.3048;
$yacht_sale_length_feet = $yacht_sale_length / $feet; ?><?php echo $yacht_sale_length . ' m (' . round($yacht_sale_length_feet, 0) . ' ft)'; ?></div>
</div>
</div>
</div>
</li>

<?php

} // End year
} // End length
} // End Min price condition

}

}
?>

</ul>
</div>
</div> <!--navigation div end -->

<script>
new AnimOnScroll(document.getElementById('grid'), {
minDuration: 0.4,
maxDuration: 0.7,
viewportFactor: 0
});

jQuery(document).ready(function() {
jQuery('.YachtsList li').mouseenter(function() {
var li_height = jQuery(this).height();
var content_height = jQuery(this).find('.DetailsContent').height();
var top = (li_height - content_height - content_height + 40) / 2;
jQuery(this).find('h3').css('transform', 'translate3d(0,-' + top + 'px,0)');
jQuery(this).find('.Description').css('transform', 'translate3d(0,-' + top + 'px,0)');
jQuery(this).find('.DescriptionMore').css('transform', 'translate3d(0,-' + (top + 20) + 'px,0)');
}).mouseleave(function() {
jQuery(this).find('h3').css('transform', 'translate3d(0,0px,0)');
jQuery(this).find('.Description').css('transform', 'translate3d(0,0px,0)');
jQuery(this).find('.DescriptionMore').css('transform', 'translate3d(0,0px,0)');
});
});
</script>

 

</div>
</div>

<script src="<?php echo get_stylesheet_directory_uri(); ?>/js/content-end.js"></script>
<?php
get_footer();

 

</code>

Url is https://ycs.gr/yacht-charter/

I am a licensed customer.

Hello

Please  drop  me exact  link to  the  page  where  you use  my  filter

I have already mentioned it.

Here is again:

https://ycs.gr/yacht-charter/

https://ycs.gr/yacht-sale/

 

any feedback?

Hello

Please  drop  me exact  link to  the  page  where  you use  my  filter

I have nothing to do with this third party filter - https://c2n.me/4buAtGb.jpg