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

Pages in search results

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #52651
    janna_JB51janna_JB51
    Participant

    I created a custom search results page using elementor and selected to use it for my search form. On the page, I have the Products Widget, a Posts Widget, and an Elementor Loop Grid widget in a TABS widget so users can view Product results, Custom Post type results and Page results separately. Each item has the search form class assigned per documentation.

    However — despite setting the content type to display — the Posts widget which is set to display my custom post type shows WooCommerce products and the Loop Widget which is set to display pages, displays nothing.

    See https://phu.cf5.myftpupload.com/custom-search-results/?asp_ls=pool&asp_active=1&p_asid=1&p_asp_data=1&filters_initial=1&filters_changed=0&qtranslate_lang=0&woo_currency=USD&current_page_id=4

    Please help.

    #52654
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    I’m afraid results separation this way is not possible to do. It’s not because of the search plugin, but generally this is not possible only by using different kinds of widgets, because all of them will simply use the same query output. Elementor will not separate them, all of them will simply output the same thing. Even if it worked, their pagination would be broken, as potentially non-existing pages of results could appear.

    Unless you are a very experienced programmer, I would not recommend doing this. In the past 12 years I have only seend 2 or 3 cases where they were able to build a custom grouped results page, and all of them were custom coded from top to bottom, as this is not possible simply via page builders.

    Usually I suggest a custom code where I can, but this is far far more complicated than that, and it is not because of the search plugin either.

    I recommend using either of those widgets – the posts widget works the best all around for all types of content. Another, perhaps even better possibility is to have multiple search bars for multiple types of a results and multiple results pages.

    I wish this was possible, I know a few of my customers who would love this separated results page.

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