Lazyest Gallery
[resolved] Adding Link to Image (3 posts)

  1. b-summers
    Posted 4 years ago #

    I have added a custom field called "image-link". But I have NO idea how to actually implement this custom field. The user manual was not very instructive.

    What I'm trying to do is allow the user to add a link to each image. But I'm getting stuck on how to actually display this in the code.

    In the inc/functions.php file I have this...

    ID, 'image-link', true); ?>" /><img src="http://...etc" />

    since these images are not coming from a post, I'm assuming that's why it's not working, but I don't know what to use in it's place to get my custom field to show up.


  2. b-summers
    Posted 4 years ago #

    that didn't really work....here's the php code...I've added this in the a href tag, as I'm trying to get the image to link.

    echo get_post_meta($post->ID, 'image-link', true);

  3. Marcel Brinkkemper
    Plugin Author

    Posted 4 years ago #

    You could also enter links in the caption or description.
    To show your link for in slide view add this code:

    function my_extra_field( $image ) {
      echo $image->extra_fields['image-link'];
    add_action( 'lazyest_frontend_slide', 'my_extra_field' );

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Lazyest Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.