Block: Classifieds Search
The Classifieds Search block renders just the search form you can use to filter the Ads list, there are two primary ways this block is being used.
- You can use it on a Page along with the Classifieds List block to allow your users to filter the Ads displayed on the list.
- You can use it as a standalone block (for example on the homepage) that will allow users to search and be redirected to a page with the Classifieds List
Creating Classifieds Search
In order to create a new page with the Classifieds Search block you can:
- Go to the wp-admin / Pages / Add New panel
- Enter the page title, in the content, start typing “/Classifieds” some suggestions will pop up, click on the Classifieds Search
- The block should render a settings page,
- From the post types selection select “Classifieds” (new post types you can register with the Metaverse extension).
- Select Form Scheme or leave the field blank to use the default form scheme (you can register different search form schemes with the Custom Fields extension).
- Press “Apply“.
- The search form should now render, when you click on it in the right sidebar you should be able to select from multiple customization options.
Below you can watch a video showing how to quickly set up a Classifieds Search block.
Classifieds Search Block Options
Search form Scheme – if you have the Custom Fields extension installed then you can select here a search form scheme that should be shown, by default the form with the keyword and location fields will be shown.
Search and Filter Buttons Position – you can select here if the search and filter (if shown) buttons should be shown next to the search form or below it. Usually you will want to show it below the form when using the Classifieds Search block in a sidebar.
Redirect To – When using the shortcode in a standalone mode (for example on the homepage to show just the search bar without the Classifieds List below it), then you can enter here an URL to which the user will be redirected after clicking the search button, ideally the user should be sent to a page that can show the search results.
Styling / Form
The search form will use the styles set in the wp-admin / Classifieds / Options / Default Styles panel, if you want to customize the styling you can check the “Customize the default form styling” toggle and enter custom styling options.
All the options that will show are explained in more details in the Default Styles section.
Note it is recommended that you do the styling in the the wp-admin / Classifieds / Options / Default Styles panel first and only customize the forms and buttons if you want to have the show differently then the defaults.
Styling / Primary Button
Button Text – the text that will be shown in the button, by default “Search”
Button Display – one of: “text” show only the button; “icon” show only the icon on the button; “icon and text” show both icon and the text. Note that by clicking the small monitor icon you can switch between the desktop and mobile display and set different display options for the desktop and mobile browsers.
Customize the default form styling – as in the Styling / Form section you can toggle this button to set custom styling for the primary button (in this case the search button).
Styling / Secondary Button
The options here are the same as for the Styling / Primary Button, but apply to the secondary button.
In the case of the Classifieds Search block the secondary button is the “Filter” button – that is a button which shows a hidden search options, it is only shown if you are using a search form scheme (created usually with the Custom Fields extension) with some hidden search fields. In other words by default this button is not displayed.