With this snippet you can display all the advanced search fields by default.
The search form is divided into 2 areas: standard and advanced. The advanced part only shows up if the WPCasa Advanced Search add-on is installed and active. This part can be toggled to be visible or not – by the user of your site. This state gets saved within a cookie which is left on the users computer.
With the code snippet above, you basically make the advanced search fields visible by default. So if you load your website, they show up by default and your users can toggle them to be hidden (instead of having the fields hidden by default and having the user to toggle them to be visible).
The attached CSS Snippet lets you hide the “Advanced Search” Button. So the user does not have the option anymore to display or hide the advanced search fields – regardless if they’re visible or not.
Keep in mind that if you add this code snippet, you’d first need to clean your browser cookies (specifically that cookie for your website) in order to get the cookie deleted from your computer, which contains your choice (if advanced search fields are visible or not). So right after you’ve added this snippet, clean your browsers cookies (not only the cache) and reload your page. The advanced search fields should then be straight visible.
Other articles in Snippets
- Using Code Snippets
- Snippet: Set specific offer as default in listing price metabox
- Snippet: Modify Measurements
- Snippet: Re-order fields in search form
- Snippet: Remove Features from Search Form
- Snippet: Add custom text (from) before price
- Snippet: Custom Advanced Search Fields
- Snippet: Make Listing Type Taxonomy hierarchical
- Snippet: Custom Listing Post Type Slug
- Snippet: Custom Listing Type Taxonomy Slug
- Snippet: Custom Listing Feature Taxonomy Slug
- Snippet: Custom Listing Category Taxonomy Slug
- Snippet: Change Labels of Listing Post Type
- Snippet: Change Archive Title
- Snippet: Add Custom Listing Details
- Snippet: Add Custom Listing Detail with Pre-defined Options
- Snippet: Add custom listing offer
- Snippet: Search Exact Value of Bedrooms
- Snippet: Change Default Search Form Labels
- Snippet: Change Advanced Search Form Labels
- Snippet: Only Display Keyword Search in Property Search Form
- Snippet: Search Exact Value of Bathrooms
- Snippet: Remove ‘Offer’ from Property Search Form
- Snippet: Change Placeholder Text of the Keyword Search Field
- Snippet: Show Different Offer Badge when Listing Item is not Available
- Snippet: Change Details of the Listing Summary