WordPress.org

Ready to get started?Download WordPress

Forums

ZenphotoPress
Image Sort Order (4 posts)

  1. JakeBondo
    Member
    Posted 3 years ago #

    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?

  2. Simbul
    Member
    Plugin Author

    Posted 3 years ago #

    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 ;)

  3. JakeBondo
    Member
    Posted 3 years ago #

    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);
    			?>
  4. Simbul
    Member
    Plugin Author

    Posted 3 years ago #

    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".

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic