I am trying to: filter the search results
Link to a page where the issue can be seen: hidden link
I expected to see: empty fields when no selected, and the correct homes displayed
Instead, I got: the top field is showing by default and the search does not seem to work.
This is also the case on a few other multisites but the original site works fine (hidden link ) Theme is the same on both sites, as are the plugins in use.
Kindest regards,
Pete
Hi, please edit this View on the dev site and go to the Custom Search settings. If you cannot see the Custom Search settings panel, scroll to the top right corner and click "Screen Options". You can enable the Custom Search panel here. Choose the option "Let me choose individual settings manually", then be sure the option "Always show all values for inputs" is selected. If not, select it and save the View.
I suspect that could be the issue, but if not, please try the following troubleshooting steps:
- Temporarily deactivate all plugins except Types and Views. Activate a default theme like Twenty Seventeen and test again.
- If the problem was resolved, reactivate your theme and other plugins one by one until the problem returns.
- If the problem was not resolved, please edit the View again and copy + paste all the code from the Search and Pagination panel in your next reply.
Hi,
This is still an issue it seems - here is the code from search and pagination:
As I say this all works on the original site before we moved to a multisite setup.
[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div class="uk-child-width-1-1 uk-grid uk-grid-small uk-grid-stack" uk-grid="">
<div>
<div class="uk-card uk-card-body uk-card-primary">
<div class="form-group uk-form-controls">
<label class="uk-form-label">[wpml-string context="wpv-views"]Search:[/wpml-string]</label>
[wpv-filter-search-box output="bootstrap" class="uk-input"]
</div>
</div>
</div>
<div class="uk-hidden">
<div class="uk-card uk-card-body uk-card-default uk-text-center">
<p>[wpv-filter-submit name="Apply Filters" class="uk-button uk-button-primary"] [wpv-filter-reset class="uk-button"]</p>
</div>
</div>
<div>
<div class="uk-card uk-card-body uk-card-default">
<div class="form-group uk-form-controls">
<label class="uk-form-label">[wpml-string context="wpv-views"]City[/wpml-string]</label>
[wpv-control-postmeta field="wpcf-property-address-city" type="select" url_param="wpv-wpcf-property-address-city" class="uk-select"]
</div>
</div>
</div>
<div>
<div class="uk-card uk-card-body uk-card-default">
<div class="form-group uk-form-controls">
<h4 class="uk-margin-remove">Price</h4>
<div class="uk-grid-small" uk-grid>
<div class="uk-width-1-2">
<label class="uk-form-label">[wpml-string context="wpv-views"]From[/wpml-string]</label>
[wpv-control-postmeta field="wpcf-price" url_param="wpv-wpcf-price_min" class="uk-input"]
</div>
<div class="uk-width-1-2">
<label class="uk-form-label">[wpml-string context="wpv-views"]To[/wpml-string]</label>
[wpv-control-postmeta field="wpcf-price" url_param="wpv-wpcf-price_max" class="uk-input"]
</div>
</div>
</div>
<div class="form-group uk-form-controls">
<label class="uk-form-label">[wpml-string context="wpv-views"]Property Status[/wpml-string]</label>
[wpv-control-postmeta field="wpcf-property-status" type="select" url_param="wpv-wpcf-property-status" class="uk-select"]
<label class="uk-form-label">[wpml-string context="wpv-views"]Estimated Completion Date Up To:[/wpml-string]</label>
[wpv-control-postmeta field="wpcf-property-estimated-completion-date" url_param="wpv-wpcf-property-estimated-completion-date" class="uk-select"]
<label class="uk-form-label">[wpml-string context="wpv-views"]Property Bedrooms[/wpml-string]</label>
[wpv-control-postmeta field="wpcf-property-bedrooms" url_param="wpv-wpcf-property-bedrooms" class="uk-select"]
</div>
</div>
</div>
<div>
<div class="uk-card uk-card-body uk-card-default uk-text-center">
<p class="uk-hidden@s">[wpv-filter-submit name="Apply" class="uk-button uk-button-primary"] [wpv-filter-reset class="uk-button"]</p>
<p class="uk-visible@s">[wpv-filter-submit name="Apply Filters" class="uk-button uk-button-primary"] [wpv-filter-reset class="uk-button"]</p>
</div>
</div>
</div>
[/wpv-filter-controls]
[wpv-filter-end]
Thank you again for your assistance,
Kindest regards,
Pete
As a quick test, let's add the "default_label" attribute for the City select field like this:
[wpv-control-postmeta field="wpcf-property-address-city" type="select" url_param="wpv-wpcf-property-address-city" class="uk-select" default_label=" "]
Notice the value of the attribute is a blank space. This should add a default empty option in the select field. Please try this test and if it works as expected for this field, you can continue adding this default_label attribute to the other search fields. Let me know if that doesn't solve the problem and I can take a closer look.