• How hard would it be to have a post-sorting?functionality so visitors can?sort?the results?
    We can do it in the backend but some AJAX filters in the front will be good to display.

    • This topic was modified 1 year, 5 months ago by marioxt.
    • This topic was modified 1 year, 5 months ago by marioxt.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Phi Phan

    (@mr2p)

    Hi @marioxt, Could you please explain more about what you mean by post-sorting functionality? Do you mean sorting posts in the Query Loop? If so, CBB already has a setting called Get orderby from query string that lets you sort posts by query string in the Extended Filters and Sorting panel. You can sort posts by adding a query parameter like ?orderby=title, etc. You can sort by title, date, menu_order, meta fields… It also supports random sorting or mutliple criteria.

    Phi.

    Thread Starter marioxt

    (@marioxt)

    Hi Phi,
    Yes I saw those . They are great , but can they be displayed on page.
    Like a “portfolio menu” so that visitors can click a button and sort by date , or custom meta from acf ?
    Thanks
    Mário

    Plugin Author Phi Phan

    (@mr2p)

    @marioxt You can use a navigation block and input links with an orderby parameter, or you can use the HTML block to add an HTML select element for that purpose. The Query Loop will sort its contents correctly as long as the query string has a valid orderby value. You can place those sorting components anywhere on the page. I think it’s better to not include those components in the CBB.

    Phi.

    Thread Starter marioxt

    (@marioxt)

    OK . I will check how I can work that out. Thanks.

    Plugin Author Phi Phan

    (@mr2p)

    @marioxt You’re welcome. I have used it that way in some projects, and it works really well. If you need further help, feel free to contact me.

    Phi.

    Thread Starter marioxt

    (@marioxt)

    Hey Phi it works:) That is awesome.
    I wonder how hard it would be to add AJAX to the sorting navigation. Thougts?

    Plugin Author Phi Phan

    (@mr2p)

    @marioxt I’m glad to hear the sorting works. Adding AJAX sorting is not very difficult, but I don’t want to include that kind of feature in this plugin. This plugin is not meant to customize the Query Loop, it only adds some essential features to the Query Loop that I think are necessary for real-world projects.
    Phi.

    Thread Starter marioxt

    (@marioxt)

    Yes. You are absolutely right. The Query Loop is lacking a few options and you did a great job providing extensions to it. I am also seing you are a developer that tries to fill the gaps ?? as I am also using your MFB plugin to get ACF meta fields into play ??
    The reason I need AJAX is that currently we will need it for a search function to query results too. I will try and see how I can implement it. As for CBB I am also debating on getting the pro version as it is important to make this work continued and supported. Thank a lot Phi for your help.

    Plugin Author Phi Phan

    (@mr2p)

    You’re welcome, @marioxt. I appreciate your kind words and your support for my plugins.

    I hope you can find a way to implement the AJAX sorting. If you have any questions or issues with my plugins, please feel free to contact me. I’m always happy to help.

    Phi.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Sort for Visitors’ is closed to new replies.