This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Global Search (categorized)

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Global Search (categorized)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #53776
    adam_8GLmadam_8GLm
    Participant

    Hey, all good?

    I need some information or guidance on how to use the plugin to build a more advanced search results page than the default WordPress one. Let me explain.

    On the private site I shared, there’s a placeholder for search in the top-right menu. When a user types something there, they’ll be redirected to a results page like /search-results/.

    This site includes several content types, such as:

    Blog articles
    Solutions (post type) and sub-solutions (sub posts)
    Products (post type)
    Product taxonomies (post type)
    Services
    Team Members (post type)
    Support Docs (post type)
    FAQs (post type)
    Testimonials and Case Studies (post type)

    Each post type and taxonomy was created using ACF, and each content type has its own ACF field group.

    On the search results page, I need the results to be displayed differently depending on the content type. For example, if the user searches for “barcode scanning”, they might get several types of results:

    A barcode scanning solution
    A related FAQ
    A blog post on the topic
    Products
    etc.

    Each result should have a unique visual style:

    For FAQs: title and answer

    For solutions, products, or blog posts: image, title, excerpt, and a “read more” button

    Each card would represent a different result type, so the final list would look something like this:

    10 Results for “barcode scanning”:

    Products:
    Product X, Product Y…

    Solutions:
    Solution A

    Blog Articles:
    Post 1, Post 2…

    FAQ:
    Q: Do you provide barcode scanning solutions?
    A: Yes, we offer mobile, fast, and flexible hand-held scanners providing fast, flexible code reading capabilities for a wide range of applications.

    Q: What is barcode scanning?
    A: Lorem ipsum…

    ==========

    Does that explanation make sense?

    Do you have any reference materials or could you guide me on how to achieve this result?

    We can also work with filters, no problem, the important thing is to have some way of rendering the content differently depending on its type.

    I’m using Elementor for the frontend.

    #53783
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    Well, the only option I see to achieve this is to completely custom code the results page.

    The search plugin has no effect on how the results page looks or behaves, that is controlled by the theme (or page builder). The main issue here is that the results page is a single query, and the results are handled in a way that only items from a specific offset to a specific limit are returned for each page. This makes is nearly impossible to make groups, without doing additional queries to make grouping possible.

    I have only seen one case in my career in WordPress where someone made something similar to this work (grouoping by post type on the results page), and it was very difficult. Unless you are an expert in theme coding, I wouldn’t recommend trying to achieve this – it is definitely impossible without coding.

    I would love to recommend anything, but in this case there is nothing to start off as it’s only doable with custom coding. You can try contacting wpkraken for a quote about this, they may have done something similar before.

    #53790
    adam_8GLmadam_8GLm
    Participant

    Understood, it doesn’t seem that difficult to me, I only asked because there could be some native way in the plugin and that would speed things up here.

    Thanks anyway.

    But the main question still remains, is it possible to do this global search on the entire site? Just select all the sources in the plugin’s configuration, is that it?

    Once the search is on the entire site and with the possibility of filtering (the plugin should do this) I can make the necessary edits without any problems.

    #53791
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Understood, it doesn’t seem that difficult to me, I only asked because there could be some native way in the plugin and that would speed things up here.
    Indeed, but there are some technical details which complicate this a lot.

    But the main question still remains, is it possible to do this global search on the entire site? Just select all the sources in the plugin’s configuration, is that it?
    Yes, sure – you just select all of the sources you want, and that’s it.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.