Support » Plugin: Accept Stripe Payments » Any way to sort products?

  • Resolved Pedro Magnifico


    I’m just getting started with this plugin and it seems to be working just fine, after a bit of fiddling with css. One question, though: it appears that products can only display sorted by post date, which seems odd. Is there a way to specify sort order? Or sort alphabetically?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Alexander C.


    Hi Pedro.

    Currently, sorting of the products is indeed not documented much. And also it isn’t very flexible as well. However, it’s still somewhat usable.

    What you need is “sort_order” and “sort_by” shortcode parameters.

    Using “sort_order”, you can designate the ascending or descending order by setting it to “asc” or “desc” respectfully.

    Using “sort_by”, you can specify how the products are sorted. Supported values are:
    ‘none’ – No order.
    ‘ID’ – Order by post id. Note the capitalization.
    ‘title’ – Order by title. (‘post_title’ is also accepted.)
    ‘date’ – Order by date. (‘post_date’ is also accepted.)
    ‘modified’ – Order by last modified date. (‘post_modified’ is also accepted.)
    ‘rand’ – Random order. You can also use ‘RAND(x)’ where ‘x’ is an integer seed value.

    So, to sort your products alphabetically, here’s how your shortcode should look like:

    [asp_show_all_products sort_order="ASC" sort_by="title"]

    Thread Starter Pedro Magnifico


    Thank you Alexander!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Any way to sort products?’ is closed to new replies.