简体   繁体   English

使用Jquery按自定义数值对页面上的wordpress帖子进行排序

[英]Use Jquery to sort wordpress posts on a page by custom numeric value

So I have this plugin, http://codecanyon.net/item/taxonomies-filter-widget/full_screen_preview/4282257 that basically filters posts (in my case). 所以我有这个插件, http ://codecanyon.net/item/taxonomies-filter-widget/full_screen_preview/4282257基本上可以过滤帖子(以我为例)。

I have used the plugin "Advanced Custom Fields", documentation here: http://advancedcustomfields.com/resources/ I used this to add a number field to my create post form. 我使用了“高级自定义字段”插件,这里的文档: http : //advancedcustomfields.com/resources/我用它在我的创建帖子表单中添加了数字字段。 Basically, it is a field to enter the price. 基本上,这是输入价格的字段。

I'm interested in using JS to order the posts on a page (that has been filtered, using the plugin) in ascending and descending orders based on the price. 我有兴趣使用JS根据价格按升序和降序对页面上的帖子(已使用插件进行过滤)进行排序。 Not sure how I can do this since the documentation for "Advanced Custom Fields" only talks about php. 由于“高级自定义字段”的文档仅讨论php,因此不确定如何执行此操作。

Is there an easy way of using only JS to do what I want? 有一种简单的方法可以只使用JS来完成我想做的事情吗? I hope I was clear 我希望我很清楚

Thanks 谢谢

Maybe you could show us more of your implementation? 也许您可以向我们展示更多实施方案? Take a look at http://tinysort.sjeiti.com/ I think it is what you need! 看看http://tinysort.sjeiti.com/,我认为这是您所需要的!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM