Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #377806

    Hi,

    I have a very simple Gallery where I need the individual images to link to pages on the site.

    I have downloaded the WP Gallery Custom Links plugin and that now enables me to add the URLs to the images but they don’t work? For now I have added:

    add_filter(‘avf_avia_builder_gallery_image_link’, ‘avia_change_gallery_thumbnail_link’, 10, 4);
    function avia_change_gallery_thumbnail_link($link, $attachment, $atts, $meta)
    {
    $custom_url = get_post_meta($attachment->ID, ‘_gallery_link_url’, true);
    if(!empty($custom_url))
    {
    $link[0] = $custom_url;
    $link[‘custom_link_class’] = ‘aviaopeninbrowser’;
    }
    return $link;
    }

    to the bottom of Functions.php located in the Enfold theme folder.

    I have followed a few threads about this but I haven’t seen anyone confirm that it works.

    Any help would be appreciated.

    Kind regards,
    Brian

    #378135

    Hi brianwelsh!

    Thank you for using Enfold.

    I’m sorry but this is not possible without major modifications on the theme. You can add the images manually using the Image element then set the link.

    Cheers!
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.