![]() |
|
news order in search page - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: news order in search page (/thread-13019.html) |
news order in search page - vincent3569 - 2017-09-28 hi in search page, the news list is with title (or titlelink ?) order, but I want to list them with date (recent first) (as the default order in news loop on news page). so I write this code in my search page:
but it has no effet on news order. news order in search page - vincent3569 - 2017-09-28 btw, the markdown doesn't very well on my example. news order in search page - acrylian - 2017-09-28 Your code example looks fine formatted for me? Alternatively you can also use plain html for formatting as well. Yes, you need to set the order via the search object. I can't say offhand but it might be already to late to set these values in that place. I have a far memory about an older forum post or something I can't find that you even might need to do this within the theme's functions.php. Have to try myself later today. Also clear or disable the search cache just to be sure this doesn't interfere for unknown reasons. news order in search page - fretzl - 2017-09-28 @vincent3569: FYI, I put your code between backticks to make it look a bit better. news order in search page - vincent3569 - 2017-09-28 ok, I tested by adding this code in function.php:
and it works fine for news order, but it doesn't work with pages (I tested with 'title' and 'date', but with no effect on sorte order). btw: don't you think it could be a search parameter as it is the same one for album and image search order, set in admin>options>search? news order in search page - acrylian - 2017-09-28 Have to try myself later when I get the time. It should work for any item type like this. Btw, instead of
Yes, absolutely, default options for news and pages are actually on the list! Just didn't get to it news order in search page - acrylian - 2017-09-28 It seems I can reproduce the issue with pages. Thanks for the ticket, would not have been necessary though. |