Thanks! This is to be added in functions.php, right?
Well – of course it went there… sorry for the silly question.
Just one note: as it is now, if the picked post is only available in the other (wrong) language due to a missing translation, the plugin will display it anyway. Not a major issue, but you may want to consider a fix.
More importantly, however, is that on mobile I would like to display the results as a scaled-down row instead of a restacked series. Can you suggest the CSS to make this happen?
Thanks in advance!
On the CSS, I have to admit I’m not sure yet. By scaled down row, do you mean just text?
In terms of the WPML, I’ll need to check the docs. I’m not a user of this myself so the implementation was when I had a test version from them.
About scaling down – What I mean is to keep the same visual layout of the desktop view, just made smaller to fit on the mobile screen without rearranging the thumbnails on two or more rows.
About WPML – I am sorry, but I don’t know its technical side enough. What I would dare to suggest is a behavior like “if the record is empty due to missing translation, skip to the next item”, but there stops my programming prowess 🙂
About WPML, please see this post from another user: https://wordpress.org/support/topic/compatibility-with-wpml-66/#post-12586548
On scaling down, are you talking of propotionately smaller images in the same row/rows? I’m not sure how easily achievable that is plus user experience. e.g. with a mobile screen you’ll end up with very tiny thumbnails vs 150x as it is now.
An alternative is that you have a single size smaller thumbnail vs desktop view?
Thank you for the link!
Yes, about the scaling, that is what I have in mind. This is something I have seen on other mobile sites (three thumbnails side by side) and that I have made a mockup of for mine – it is of course small, but clear enough to drive people to look at the thumbnails and click them.
By the way: the WPML-related code did work all right, and you should really incorporate it in your plugin 🙂
And here is what I mean with scaling. Above is the regular output of the plugin on mobile, and below the scaled output of another plugin (that however doesn’t work as good with language selection).
on WPML, I’m modifying the plugin to better support the single language of WPML. Will be in the next version.
However, I don’t think I have a solution to the CSS. Unfortunately it isn’t my forte