Order Results by Product/Variations first and Categories at the bottom

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Order Results by Product/Variations first and Categories at the bottom

This topic contains 3 replies, has 2 voices, and was last updated by niumalta96 niumalta96 2 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34185
    niumalta96
    niumalta96
    Participant

    We have a woocommerce site and would like to have the Products/Variations loaded first and then the Categories at the bottom. It seems to be working well on the first set of results and we are having Products at the Top and Categories at the bottom. However if you start scrolling and new results are shown, the new results are all products on load more.

    Is it possible to have products/variations render first and then on load more products/variations keep showing up until all products are all returned. Once there are no more products, categories show up in the load more results request.

    Please note that this is a live site and no changes should be done without consulting us.

    #34186
    niumalta96
    niumalta96
    Participant
    You cannot access this content.
    #34189
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    For each request the search tries to return the number of items from each group (taxonomy terms, post types) as defined on the General Options -> Limits options panel.
    In this case, probably all the category results were shown at the first iteration, then the the “load more” feature only fetched the rest of the products.

    The only possible resolution I can see to this is via a custom CSS code – by forcing the taxonomy term results to stay at the bottom of the stack:

    div.asp_w.asp_r .resdrg {
        display: flex;
        flex-wrap: wrap;
    }
    
    .item {
        flex: 0 0 100%;
        order: 0;
    }
    
    .item.asp_r_term {
        order: 1;
    }

    Apply this code to your theme custom CSS field (if it supports it) or use the custom CSS field on the search plugin back-end.

    With this, even after the new results being loaded, the taxonomy results will stick to the bottom.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #34193
    niumalta96
    niumalta96
    Participant

    We will try it out, thank you for your assistance 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.