Leon Vincent
Forum Replies Created
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
Thank you for your reply Alex.
Good news that this is coming in V2. Any guess when it is coming out?
For now, i think i will work it out using the category option.
Yet, i have 2 CPT and 6 Categories.
Hi,
The site is not up yet.
The custom field css class is place_has, which then becomes .gd-field-geodir_Place_has by the plugin.
This piece of code shows the custom fields only when the category with value “18” is selected from the dropdown and hides it otherwise.
jQuery(document).ready(function( $ ){
$(‘.geodir-filter-cat.gd-type-single.gd-field-geodir_Place_has’).hide();
$(‘.cat_select’).change(function(){
if($(‘.cat_select’).val() == ’18’) {
$(‘.geodir-filter-cat.gd-type-single.gd-field-geodir_Place_has’).show();
} else {
$(‘.geodir-filter-cat.gd-type-single.gd-field-geodir_Place_has’).hide();
}
});
});
And since i will add more custom fields for each category, i will use “else if” to add more conditions.
I see.
Creating a CPT for each category with different custom fields is not practical i guess.
I used jQuery to hide filters based on the category dropdown selection. It works fine. I just hope it does not cause any problems later.
Thanks
Signup to our newsletter for a chance to win a Lifetime License worth $1,495.
Buy with confidence: If you win, we'll refund any purchase made during the sale!
You've been entered into the draw.
Check your inbox for confirmation.