There is a news item that is displaying at the beginning of the news items that was first published in 2010 and should be the last one. The view is a custom search "News by Category" with a dropdown of categories. Selecting the categories seems to work but It's not sorting by post-date. Want to display most recent first.
hidden link
is at the top of "news" but should be last.
We just went into production so I haven't made a specific duplication of staging and am not concerned by that.
Hello,
Thanks for the details, I can log into your website.
But I am not sure where and how can I see the problem, I have checked the URL you mentioned above, there isn't any post view.
I assume you are going to sort the view's result by taxonomy "category".
If it is, there isn't such a built-in feature within Views, since Views is using WordPress class WP_Query to query posts, see wordpress document:
https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters
There isn't such an option to order the result by taxonomy.
And you can sort the result by post date "descending", so Views result will output the most recent items first.
For example, in your screenshot:
hidden link
in section "Ordering", choose: Order by Post date Descending
Hello again, Luo. On the menu is “News & Ideas” and right at the top is the oldest item “hidden link. It seems no matter what change I make to the view that particular item shows up in the list. It is very odd.
The drop down sorts by category and we want newest first. I will try the post date descending if you will please check to see if something is wrong with that’l record.
You can reproduce the issue by going to news & ideas and selecting “News”
1st in list is newest and 2nd in list is oldest. Sorting by post date descending...
I assume we are talking about this page:
hidden link
And this post view "News by Category"
hidden link
I have tried these in your website:
1) Edit above post view, in section "Ordering", choose: Order by Post date Descending
2) In section "Loop Editor", add shortcode within loops:
[wpv-post-date]
Test it in front-end:
hidden link
I see the problem as you mentioned above, but this problem is abnormal, please check these:
1) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, deactivate all custom PHP/JS code snippets, and test again
2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
3) If the problem still persists, please provide database dump file(ZIP file) of your website, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/
Thanks for the details, I am downloading the files, will update here if there is anything found
I have downloaded the file database-sent-by-dropbox.zip you provided, it is not valid, there is only a XML file in it.
Please share the database dump file link to my email box: luo.y@onthegosystems.com, then update this thread.
Thanks
Hi, Luo. This is the thread that I sent the database for through google drive...Jim
Thanks for the details, I can download the files, will update here if there is any found.
Here are what I found, I can import your database dump file into my localhost, but it works fine, see screenshot news-and-ideas.JPG
All posts are sort by post date descending.
So it should be a compatibility problem of your website, please try as I mentioned above:
https://toolset.com/forums/topic/sorting-news-items-by-category-with-dropdown-but-want-most-recent-at-the-top-of/#post-1282881
In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2019, deactivate all custom PHP/JS code snippets, and test again
If you need more assistance for it, please try these:
1) Backup your website,
2) Provide your website credentials and FTP access in below private message box, I can try to locate the problem plugin/theme in your website.