In the zenphotopress popup window, I would like the to be able to sort the images by date in descending order. I currently have to select gallery, then select page 5 before I can add the correct image. Is there a way to change the sort oder by date?
In the zenphotopress popup window, I would like the to be able to sort the images by date in descending order. I currently have to select gallery, then select page 5 before I can add the correct image. Is there a way to change the sort oder by date?
Yes, there's a way. Open classes.php and add this code at line 421:
array('name' => __('Latest','zenphotopress'), 'value' => 'latest'),
This will add an option in the "ordered by" dropdown which you can select to sort your images by date, with the most recent first.
I think I might add the option in the next ZPP release, but if you want to make use of it in the meantime, you just have to modify edit the code ;)
I just edited the class.php and I am still just getting, Order images by: sort order, title, and ID.
I am not sure why it is not showing up in the menu.
This is what I have starting with line 419:
<?php
$opts = array( array('name' => __('Latest','zenphotopress'), 'value' => 'latest'),
array('name' => __('Sort Order','zenphotopress'), 'value' => 'sort_order'),
array('name' => __('Title','zenphotopress'), 'value' => 'title'),
array('name' => __('ID','zenphotopress'), 'value' => 'id'));
ZenphotoPressAdminUI::printFormSelect('orderby',$opts,$order);
?>Weird. I tested it and it's working on my installation.
Maybe a caching issue? Oh, and btw the menu is supposed to be under "Popup options".
This topic has been closed to new replies.