How to add Custom Post Types to Global Search

This topic has 6 replies, 2 voices, and was last updated 1 months ago ago by Luca Rossi

  • Avatar: pablostevens
    pablostevens
    Participant
    February 27, 2025 at 23:44

    I have a number of custom post types. What is the x-store theme way of adding these to the global search?

    In Royal, I used to add them via an etheme function. Is there such a thing with x-store or do you recommend a plugin?

    5 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    March 3, 2025 at 14:20

    Dear @pablostevens,

    You can modify the form element and insert your custom post type by following the instructions provided in the link below:

    (https://tinyurl.com/224e2qcx)

    Additionally, please add the following code to the functions.php file located in your child theme:

    (https://stackoverflow.com/a/22669610)

    We hope this information is helpful. If you have any further questions, please feel free to reach out.

    Best regards,
    8Theme Team

    Avatar: pablostevens
    pablostevens
    Participant
    March 3, 2025 at 15:15

    Thank you so much! I’m going to try that and report back.

    Avatar: Justin
    Luca Rossi
    Support staff
    March 4, 2025 at 06:10

    Let us know how it goes!

    Best regards,
    8Theme’s Team

    Avatar: pablostevens
    pablostevens
    Participant
    March 4, 2025 at 16:31

    Ok so I’ve added the code to functions.php, but I’m not using Elementor, I’m using the x-store header builder. I’m not seeing an option for custom post types in the Ajax search:

    Files is visible for topic creator and
    support staff only.
    Avatar: Justin
    Luca Rossi
    Support staff
    March 5, 2025 at 09:49

    Hi @pablostevens,

    Could you please provide temporary wp-admin and FTP access? We will check what can be done to help you.
    To grant WP-Admin access, please proceed to create a new user account with an administrator role through your WordPress Dashboard. Once the account is established, you may securely transmit the username and password to us via the Private Content section designated for this purpose.

    For FTP access, we require the following details: FTP host, FTP username, FTP password, FTP port, and FTP encryption type. If you need assistance in creating these credentials, please reach out to your hosting provider who will guide you through the process.

    Best regards,
    8Theme’s Team

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

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

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.