This topic has 7 replies, 2 voices, and was last updated 2 months, 1 weeks ago ago by Jack Richardson
Hi, i am using store locator plugin and would like that the Xstore theme search also searches for posts in the store locator section. The current searches for post, pages, product and category. the store locator is creating posts for stores, but it cant be found.
https://gyazo.com/1d54403aa93bb3864cc5b016264a01b3
https://gyazo.com/0778481fc0772f7029983a3cbbfff635
Dear @gewoonbovenaan,
I hope this message finds you well. We would like to inform you that we have a PHP filter available, ‘etheme_elementor_search_post_types’, which allows for the modification of searchable post types. Should you have some familiarity with PHP, you may consider adding the necessary snippet to your child-theme/functions.php file.
Alternatively, if you prefer, you can provide us with the correct wp-admin and FTP access credentials to your website. This will enable us to implement the modification on your behalf.
For your reference, the filter is defined in the following file:
et-core-plugin/app/controllers/elementor/general/search.php
Thank you for your attention to this matter. We look forward to assisting you further.
Kind regards,
Jack Richardson
8Theme’s Team
Hi thank you for your reply. Can you please add it to my php? thanks!
Hi thank you for your reply. Can you please add it to my php? thanks!
Hello @gewoonbovenaan
It seems you provided us the FTP access only but we requested for the web-site you are requesting and the correct WP-ADMIN access also.
Kind regards,
Jack Richardson
The 8theme’s team
Hi,
Sorry herewith:
Dear @gewoonbovenaan,
Thank you for providing us with the necessary access to implement the required changes.
We are pleased to inform you that we have successfully implemented the solutions to enable search functionality for custom post types on your website. Below are the details of the implementations:
1. We have added the following custom PHP snippet to your child-theme/functions.php (https://prnt.sc/Do0AKJdlJ4x2), which allows searching by custom post types:
add_filter('etheme_elementor_search_post_types', function($post_types) {
$post_types['stores'] = esc_html__('Stores', 'xstore-child');
return $post_types;
});
2. In the XStore Header builder editor, we added the ‘stores’ value to the Search post types input. You can view the configuration here: https://prnt.sc/xj3V9MuTRUtq
3. After saving the changes to the header, we tested the functionality, and the search feature in the header can now find the custom post types as requested. The test results can be viewed here: https://prnt.sc/zVgmOxKgho1q
We would appreciate your feedback on these implementations to ensure they meet your expectations.
Best Regards,
Jack Richardson
The 8Theme Team
You must be logged in to reply to this topic.Log in/Sign up