WordPress.org

Forums

[resolved] NextGEN Conditional Statement (2 posts)

  1. joshrodgers
    Member
    Posted 2 years ago #

    What I'd like to do is count the number of images for the NextGEN gallery and if there are more than 9 images then execute some code...I got close:

    http://pastebin.com/pzdgVBjN

    This code gets the amount of images and executes the conditional, but it counts all the images in the gallery, not just the ones on the current page. If there is an easier way than querying the database, that would be awesome as well (I prefer not to do that - just didn't know how to do so any other way).

    Any ideas?

    Thanks,
    Josh

  2. joshrodgers
    Member
    Posted 2 years ago #

    I figured it out!!

    My final code looks like: http://pastebin.com/jENKKANp.

    Basically the code checks see if the number of images IS larger than the number of images displayed per page...if it is larger I echo what I want it to do...if not, it does nothing.

    Thanks,
    Josh

Topic Closed

This topic has been closed to new replies.

About this Topic