Woocommerce如何按“上次修改"对产品进行排序日期? [英] Woocommerce how to sort products by "last modified" date?
问题描述
这是我的链接:
https://snake.cl/shop/?orderby=date
https://snake.cl/shop/?orderby=date
这会按创建日期
显示产品.
我遇到的问题是我更新了产品库存,我希望它们显示为新"或现在可用".
The problem I have is that I update the inventory of products and I would like them to show as if "new" or "now available".
因此,如果我可以按 last modified
日期排序,我认为这会起作用.
So if I could sort by last modified
date, that would work I think.
我查看了一些用于查询的 WP 参数,并尝试了:
I had a look at some WP parameters for queries, and tried:
https://snake.cl/shop/?orderby=modified
https://snake.cl/shop/?orderby=modified
但这不起作用.
有什么想法吗?
谢谢!
推荐答案
好的,我为可能需要此功能的其他人解决了这个问题.
OK, I figured it out for anyone else that might need this.
这是正确的query_var":?orderby=modified-desc
.
This is the proper "query_var": ?orderby=modified-desc
.
https://snake.cl/shop/?orderby=modified-desc
https://snake.cl/shop/?orderby=modified-desc
按 last modified
日期对我的产品进行排序,即当我更新库存时,它首先显示.
that sorted my products by the last modified
date, i.e when I update the inventory it shows up first.
这篇关于Woocommerce如何按“上次修改"对产品进行排序日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!