I have registered a rest field in my functions.php for the API to show:
It is showing the result correctly, now I want a custom endpoint API which I created to sort the result by the number of views from higher to lower from 2 days ago. This is the code:
For the action:
and this is the function:
The function is also working fine but the issue is that it is only taking the number of views and arranging it from 999 and backwards. I have posts which have thousands of views but it is not fetching those results. I would appreciate any help.
Xin chào các bạn và quý Thầy Cô. Hãy nhập từ khóa mình muốn vào ô tìm kiếm trên Website để tìm kiếm mọi thứ hoặc trên google các bạn hãy nhập từ khóa + dethihsg247.com để tìm kiếm các bài viết của chúng tôi nhé.
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com