Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Need help create filters for custom post
- This topic has 18 replies, 2 voices, and was last updated 1 year, 3 months ago by
Ernest Marcinko.
-
AuthorPosts
-
February 20, 2025 at 11:18 am #52993
transparentstoriess_vcbS
ParticipantHave created vehicles as the custom post type Have not create custom taxonomies will need to according to the attachments
February 21, 2025 at 10:43 am #53023Ernest Marcinko
KeymasterHi,
The best course of action is usually to have items that can be assigned to multiple items as taxonomy terms. I would suggest the type, model, engine, status as custom taxonomies and the rest as custom fields: year, moved, price – so you can create a range slider or numeric input filters on them. That should give you the best possible architecture and it’s going to be future proof.
February 23, 2025 at 6:17 pm #53072transparentstoriess_vcbS
ParticipantHii Thanks Ernest
Is there any tutorial that i can follow and get an idea how to create the filter/search or any support person that can help me?February 24, 2025 at 12:26 pm #53078Ernest Marcinko
KeymasterYes, of course! I recommend checking some concrete examples first, it helps you to understand it better:
– The staff search & filter example setup
– Also the woocommerce search setup
Both of these include filters with the same configuration as we used it on our demo website 🙂For more in-depth explanations of all features:
– You can start from the front-end filters glossary documetnation.
– Check out the taxonomy term filters part, it includes a video
– And also the custom fields filters documentationIf you haver any specific questions, let me know, I’m more than happy to help!
February 26, 2025 at 6:52 am #53101transparentstoriess_vcbS
ParticipantAlso Ernest
Can you give me something like step by step to create search and filter similar to what i have sent you?
Its very confusing i have applied filters in backend but they are not showing up on frontendFebruary 26, 2025 at 6:52 am #53102transparentstoriess_vcbS
ParticipantAlso how can i create the search result archive page?
February 26, 2025 at 10:07 am #53104Ernest Marcinko
KeymasterSure!
So, what you want is to make sure that the settings are visible. Then for each taxonomy create a taxonomy filter, and change the display modes to drop-down (or whichever you prefer). I assume you have the year, type, model etc.. as taxonomies.Then, assuming the pricing is a custom field (in the examples I will use “price” as the field), then create either a number range or a range slider filter. Both are excellent for price type of inputs.
Also how can i create the search result archive page?
The archive page is controlled by the theme (or page builder if you use any). Unfortunately search plugins can’t affect the layout of that. Most themes have a customizer for every archive, including the search archive. Try looking it up in the search settings or under the templates.February 26, 2025 at 10:24 am #53105transparentstoriess_vcbS
ParticipantOkk filters are visible now
Just one last thing how can i customize the style like i have sent the screenshotFebruary 26, 2025 at 11:45 am #53107transparentstoriess_vcbS
ParticipantAnd where i can see all the theme stylings
February 26, 2025 at 4:03 pm #53112Ernest Marcinko
KeymasterThe stylings follow the theme, as drop-down boxes are very hard to style.
The most common issue is when the theme overrides the checkbox styles. I can suggest some custom styles to get close to that layout, but since this is not part of regular support, I can’t guarantee anything. This should get you very close to that:
Apply this code to your theme custom CSS field (if it supports it) or use the custom CSS field on the search plugin back-end.
.asp_ss { background: hsl(0deg 0% 93.33%) !important; margin-top: 24px !important; padding: 12px !important; border-radius: 8px !important; } .asp_ss select.asp_nochosen.asp_noselect2 { appearance: menulist; background-image: unset; border-radius: 3px; border: unset !important; } .asp_ss .asp_select_label { padding-left: 0 !important; } div.asp_w.asp_sb.searchsettings input[type='text']:not(.asp_select2-search__field).asp-number-range { padding: 2px 8px !important; } div.asp_w.asp_sb.searchsettings input[type='text']:not(.asp_select2-search__field).asp-number-range:last-child { margin-right: 12px !important; } .asp_ss .asp_sr_btn_flex { margin-top: 22px !important; }February 27, 2025 at 5:33 am #53115transparentstoriess_vcbS
ParticipantOkk its close enough
how can i change the placements of filters
and i have created taxonomy filters but but both have same title segments how can i update for both separatelyFebruary 27, 2025 at 6:44 am #53116transparentstoriess_vcbS
ParticipantThe mobile view is also not looking good
February 27, 2025 at 12:04 pm #53119Ernest Marcinko
KeymasterOkay, let’s try some more rules to center them, that should also fix the mobile layout:
form.asp-fss-flex { justify-content: center; } div.asp_w.asp_sb.searchsettings input[type='text']:not(.asp_select2-search__field).asp-number-range { margin-left: 0 !important; } #ajaxsearchprobsettings1_1.searchsettings fieldset.asp_s_btn_container .asp_sr_btn_flex { padding-left: 0 !important; }February 27, 2025 at 2:19 pm #53122transparentstoriess_vcbS
ParticipantOkk i have worked on that
BUt now how can i change the placement of the filters what will appear firstFebruary 28, 2025 at 9:23 am #53130Ernest Marcinko
KeymasterYou can change the group ordering here, and also when you re-order them individually it changes the individual order for both taxonomies and custom fields.
-
AuthorPosts
- You must be logged in to reply to this topic.