Support » Plugin: NextGEN Gallery - WordPress Gallery Plugin » [Plugin: NextGEN Gallery] BROKEN RECORD : Gallery Link on Random Image display

  • Resolved Fill in the Blank

    (@phorbidden)


    Hey everyone,

    I have looked through the forum and I see a lot of people wanting to link their images to the associated gallery. I am having a hard time doing this. I am using the function <?php echo nggShowRandomRecent(‘random’,6,’home’); ?> to display 6 images randomly and using my custom theme gallery-home.php. The problem I face is that it uses galleryID of 0 to use ALL galleries in the query so it will never give me the proper ID associated with each image. Does anyone have a work around?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Well I am using $picturelist[$key]->pagelink = get_permalink( $gallery->pageid ); around line 358 in nggfunctions.php and it works but only for the first image that it pulls. I am not great with OOP in PHP so I am not quite sure how to get the pageid from the gallery of each image. Any help?

    and I know in line 257 it is pulling the first image information in the array from this query $gallery->pageid = $first_image->pageid; . How can I get the pageid for each image?

    please?

    I don’t know why it worked but changing it to:
    $picturelist[$key]->pagelink = get_permalink( $picture->pageid );

    did it… Thanks for nothing everyone out there 😛

    I still love you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: NextGEN Gallery] BROKEN RECORD : Gallery Link on Random Image display’ is closed to new replies.