I’m trying to replicate a category view on the main home page.
If we look at
http://www.fleuriste-a-montreal.ca/cat-fleuriste-montreal/saint-valentin/
We can see that its sorted by product title.
If we look at
http://www.fleuriste-a-montreal.ca/
Its not sorted the same way, it is sorted by product ID from last to first.
This is the short code I see in Classic Editor
[category_products category="Saint-Valentin" title="Saint-Valentin" pnumber="12" product_size="size_1" price_design="label" price_size="3" width="1/1" el_position="first last"]
Is there some options I can use in the short code to sort by title instead by product ID ?
I see el_position first last which would make sense why this is sorted from last to first.
Please help me as this makes the shopping experience for user inconsistent.
Thank you very much.
|
|
Ok I’ve found by myself.
in shoppica\library\js_composer\composer\lib\shortcodes\bycategory-woo.php
$query_args = array(‘posts_per_page’ => $pnumber, ‘no_found_rows’ => 1, ‘post_status’ => ‘publish’, ‘post_type’ => ‘product’, ‘product_cat’ => $category, ‘order’ => ‘ASC’, ‘orderby’ => ‘title’ );
Notice that I’ve added :
‘order’ => ‘ASC’ and ‘orderby’ => ‘title’ at the end of the query as parameters.
This has solved my issue.
You should consider making this default, as default sort IS ascendent and by title.
Thanks
|
|
Hello,
We will make this default.
Best,
ThemeBurn team
|
|