Is it possible to make the search for store locator posts?

This topic has 7 replies, 2 voices, and was last updated 1 weeks, 3 days ago ago by Jack Richardson

  • Avatar: gewoonbovenaan
    gewoonbovenaan
    Participant
    September 9, 2024 at 09:21

    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

    6 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    September 9, 2024 at 09:52

    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

    Avatar: gewoonbovenaan
    gewoonbovenaan
    Participant
    September 9, 2024 at 12:55

    Hi thank you for your reply. Can you please add it to my php? thanks!

    Content is visible for topic creator and
    support staff only.
    Avatar: gewoonbovenaan
    gewoonbovenaan
    Participant
    September 9, 2024 at 12:56

    Hi thank you for your reply. Can you please add it to my php? thanks!

    Content is visible for topic creator and
    support staff only.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    September 9, 2024 at 13:43

    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

    Avatar: gewoonbovenaan
    gewoonbovenaan
    Participant
    September 10, 2024 at 09:14

    Hi,
    Sorry herewith:

    Content is visible for topic creator and
    support staff only.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    September 10, 2024 at 10:21

    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

  • Viewing 7 results - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.