Following up with my previous ticket from last week (#2125895 - How to display CP in a view only if they're not being displayed in another view) I need your support again, if possible.
For the same views "Top News" and "Featured News", I now need to add a second sort order. Right now it is set by publishing date and the second sort should be by the custom field "Article Placement' where Top news has its own field slug "article-placement-top-news" and Featured news with the slug "article-placement-featured-news" (both numeric fields). So I need the second sort by these fields per each view Ascending.
I believe this is done with yet more custom code (snippets) based on some other support posts I found but I'm not certain how to go about it and if this can be combined with your code snippet.
Ok - if you want to use the custom code with filter its possible.
if you do not know how to do it, please let me know and I'm happy to adjust the code for both top and featured news views.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Now, you will have to add the proper order value to the ordering field "article-placement-featured-news" and "article-placement-top-news" and only those posts will be displayed.
Thank you for the additional code Minesh. I truly appreciate it.
I'm still having an issue with the display order at this page: hidden link
If you notice the first 4 articles under Top News view, you'll notice that the order should be different where the second article should be above the first one. This based on the sort order for both custom fields. Please see the attached images. If you look at the admin capture, I added values to the sort ordering and the numbering is correct but not reflecting at the view. ALl articles where published at the same time and same date, so the sort order should be the dictating factor.
I'm also getting a debug pop up, so I'm not sure if this has to do with me changing the sort order for the Top News and Feature News views, as I had them "Ascending" by mistake.
Since I have to work on the site and the debug pop up keeps coming up, I had to turn it off under settings as I'm not sure when you'll be online, so you might want to turn it on.