• Resolved saa2023

    (@saa2023)


    Hi PMR team,

    How can I connect each image in Image Gallery with Custom URL instead of pop-up the lightbox? I set it as Custom URL & insert the URL, but it kept showing me the lightbox. How can I solve this problem?

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author PWR Plugins

    (@rexdot)

    Hi there,

    We found that this is a bug in version 3.0, we will fix this in the next release.

    For now, please try the following:
    – Open the wp-content\plugins\portfolio-elementor\classes\Powerfolio_Portfolio.php file

    Around line 508 (inside get_portfolio_link_data), replace the following snippet

    if ($settings['linkto'] == 'image') {
                $portfolio_link = $portfolio_image;
                $portfolio_link_class = 'elpt-portfolio-lightbox';
                $portfolio_link_rel = 'rel=elpt-portfolio_' . $rel_id;
            }
            else if ($settings['linkto'] == 'image_elementor') {
                $portfolio_link = $portfolio_image;
                $portfolio_link_class = 'elpt-portfolio-elementor-lightbox';
                $portfolio_link_rel = 'rel="elpt-portfolio_' . $rel_id . '"';
            }
            else if ($settings['linkto'] == 'link' && array_key_exists('list_external_link', $post)) {
                $portfolio_link = $post['list_external_link']['url'];
                if ($post['list_external_link']['is_external'] == true) {
                    $portfolio_link_target = 'target="_blank"';
                }
                if ($post['list_external_link']['nofollow'] == true) {
                    $portfolio_link_follow = 'rel="nofollow"';
                }
            }

    With:

    if ($post['linkto'] == 'link' && array_key_exists('list_external_link', $post)) {
                $portfolio_link = $post['list_external_link']['url'];
                if ($post['list_external_link']['is_external'] == true) {
                    $portfolio_link_target = 'target="_blank"';
                }
                if ($post['list_external_link']['nofollow'] == true) {
                    $portfolio_link_follow = 'rel="nofollow"';
                }
            }
            else if ($settings['linkto'] == 'image') {
                $portfolio_link = $portfolio_image;
                $portfolio_link_class = 'elpt-portfolio-lightbox';
                $portfolio_link_rel = 'rel=elpt-portfolio_' . $rel_id;
            } 
    		else if ($settings['linkto'] == 'image_elementor') {
                $portfolio_link = $portfolio_image;
                $portfolio_link_class = 'elpt-portfolio-elementor-lightbox';
                $portfolio_link_rel = 'rel="elpt-portfolio_' . $rel_id . '"';
            } 

    Please let us know if it works.

Viewing 1 replies (of 1 total)
  • The topic ‘Connect Each Image in Image Gallery to Custom URL’ is closed to new replies.