(2013-11-08, 22:16:57)moonspider Wrote: ...
So I'm trying to add a custom code in my template's sidebar to show the latest 15 pages of this tag and their creation date.
...
It shows a list of english pages if language is set to english (which is default), but if it's the other language it shows all pages from both languages. What should be added to this code to alter results by current language?
Oh, and also, is there a way to specify how to sort results? Like, if I needed to sort them by title on a separate page.
See API and description on settings page.
Code:
$sidelists = return_i18n_search_results('story', null, 0, 15, 'title', 'de');
Sorting by title should work, although it is undocumented (except in some forum posts) and might have problems with encoded entities.