WordPress.org

Forums

[Plugin: ZenphotoPress] Call specific/random thumbnail (6 posts)

  1. v1ni
    Member
    Posted 3 years ago #

    I'm wanting to pull a single specified thumbnail and or/random thumbnail from the album that the code below dictates - in place of my existing "../images/camera_icon.png";

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    Is this possible and any idea how?

  2. v1ni
    Member
    Posted 3 years ago #

    A suitable workaround would be to set an image as the Featured Image- how?

  3. v1ni
    Member
    Posted 3 years ago #

    I'm wanting to pull a single specified thumbnail and or/random thumbnail from the album that the code below dictates - in place of my existing <?php echo $image[0]; ?>

    Code = http://pastebin.com/BnX909m1

    Is this possible and any idea how?

  4. Simbul
    Member
    Posted 3 years ago #

    I have to admit it's not entirely clear to me what are you trying to do.

    Anyway, to pull a single image, I suppose you could try and call the ZenphotoPressUI::printBadge function (see classes.php) with a value of 1 for the $number parameter.

  5. v1ni
    Member
    Posted 3 years ago #

    You can see what I want/wanted to achieve here: http://www.squeelers.co.uk/photos/

    At the minute, that is ZenShow pulling a random image in. (Code here; http://pastebin.com/vcx7VAJA)

    Ideally, as you can see in the pastebin example, I would like to use ZenPhotoPress to pull in an image based on the "album"/"page"/"post" that is referred to.

    I don't quite know if the plugin has the ability to decode that information though! I might just have to make do with what I have...

  6. Simbul
    Member
    Posted 3 years ago #

    I'm still a bit lost: do you want to rebuild a Zenphoto Gallery inside WordPress?

    If you want to use ZenphotoPress to pull photos inside a theme, I think your best bet is the printBadge function I mentioned above: that should give you a nice wrapper around ZenphotoPress calls to Zenphoto.

Topic Closed

This topic has been closed to new replies.

About this Topic