Displaying most recent image in index.php

I'm trying to see if I can squeeze a photoblog format out of the current version.

Basically the behavior I am trying to get is that when you load the index page it displays the most recent image. When I tried using the printDefaultSizedImage(getImageTitle()) function it of course spit out an error.

I tried using set_context(ZP_IMAGE) but that didn't do anything.

Can I just write <?php $zp_current_album="daily"; ?> or something?

I hope this post makes sense.


  • fretzl Administrator, Developer

    If you activate the image_album_statistics plugin you can use printLatestImages() which prints the latest image(s) by ID (the order zenphoto recognized the images on the filesystem)
    See the documentation for its parameters (https://docs.zenphoto.org/function-printLatestImages.html)

    There are also the printLatestImagesByDate() and printLatestImagesByMtime() functions.

Sign In or Register to comment.