Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Dropdowns not showing up and have search filter on the current page
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 3 years, 8 months ago.
- AuthorPosts
- December 10, 2020 at 9:24 pm #30628
FTP port is 2222 since it is SFTP
I have 3 things I am trying to accomplish/fix.
1. Showing custom taxonomy terms as dropdowns.
2. Don’t have a search bar. Only use dropdowns for filters
3. Show all results of a post type on /resources/ and filter via the dropdowns and not have to use the search and go to another page.1. As you can see in the attached screenshot I have the taxonomies selected, but they don’t show up on the front end as filters. The posts with the custom taxonomies are here https://resources-marqeta-ms.pantheonsite.io/wp-admin/edit.php?post_type=resources-home and the page with the search shortcode is here https://resources-marqeta-ms.pantheonsite.io/wp-admin/post.php?post=7423&action=edit . I do not see any dropdowns on the front end and each of those posts have a taxonomy set.
2. I want to remove the search bar and only use the dropdowns with taxonomies to filter and sort via ajax. So selecting a term in the dropdown filters the content via ajax and doesn’t send you to another page and doesn’t refresh the page. Is it possible to select terms in the dropdowns and not have to hit a submit button? Here are the search settings I am using for the Resources post type https://resources-marqeta-ms.pantheonsite.io/wp-admin/admin.php?page=asp_settings&asp_sid=1#1
3. Is there a shortcode or an embed to have /resources/ page https://resources-marqeta-ms.pantheonsite.io/wp-admin/post.php?post=7423&action=edit be the search results/filtered page? I want to show all the results for that post type on that page from your plugin. Right now I can show it via CPT UI plugin shortcode, but obviously, it won’t be filterable. Can I have /resources/ be the search/filter results page and not have to hit submit and go to another page? Basically, I do not want to go to the search page that the search produces. I want to stay on the page the search input and dropdowns are on. If this is not possible, how do I customize the search results page template?
Thank you and let me know if you need more info.
-Justin3.
Attachments:
You must be logged in to view attached files.December 11, 2020 at 2:08 pm #30651Hi Justin,
Thank you for the details.
I logged in to check your configuration, but I could not see the search bar on the back-end, I guess the ownership does not allow it to me, since this is a multisite.
I created a new one, and I applied the same configuration as you attached on the screenshots.1. This option gets rid off the search bar, and display the options only. Now, if you use the search shortcode anywhere, it will print the drop-downs only. I replaced the shortcode with the search bar I created, you can swtich it back of course.
2 & 3. Yes, and for that I changed the shortcode section like so: https://i.imgur.com/vt1MztY.png
Changing the options on the resources page, now triggers the search and displays the results under the “Results” title.I can also recommend the auto-populate feature, which triggers upon page load, and displays results initially.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 11, 2020 at 7:04 pm #30655This is exactly what I needed. Thank you so much for your help. Now I just have to apply our custom styles. Is there a way to strip all the styles so I don’t have to write a bunch of overrides?
December 12, 2020 at 10:17 am #30664Sure, you can use this custom code to force dequeue the generated search styles:
function asp_deregister_all_styles() { wp_dequeue_style('wpdreams-ajaxsearchpro-instances'); } add_action( 'wp_enqueue_scripts', 'asp_deregister_all_styles' ); add_action( 'init', 'asp_deregister_all_styles'); add_action( 'wp_print_scripts', 'asp_deregister_all_styles', 100 ); add_action( 'wp_print_styles', 'asp_deregister_all_styles', 100 )
Use this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.