Home Forums Add-ons Gallery Field Make gallery links point to pages


Make gallery links point to pages

  • I’m working with this line of code:

    $images = get_field('gallery_image');
    $size = 'full'; // (thumbnail, medium, large, full or custom size)
    if( $images ): ?>
            <?php foreach( $images as $image ): ?>
                    <a href="<?php echo get_field('url') ?> ">
                	<img src="<?php echo $image['url']; ?>" />
                    <p><?php echo $image['description']; ?></p>
            <?php endforeach; ?>
    <?php endif; ?>

    and I want this <a href="<?php echo get_field('url') ?> "> to point to specific pages on my wordpress site for each photo in the gallery. How do I go about doing this? Any help would be greatly appreciated.

  • +1 bump

    I’m also interested in how I might use the gallery field while adding per instance extra fields like an image link.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Make gallery links point to pages’ is closed to new replies.