Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #238646

    Hi,

    In my Portfolio Gallery I would the link to be deleted from the image shown in the ajax portfolio item.
    Basically no lightbox on the gallery.

    looking at the code in portfolio.php

    				case 'slideshow':
    					$params['size'] = $params['preview_size'];
    					foreach($params as $key => $param) $string .= $key."='".$param."' ";
    					$images = do_shortcode("[av_slideshow {$string}]");
    				break;

    please help

    #239509

    Hey f!

    Please refer to this topic https://kriesi.at/support/topic/disable-lightbox-in-portfolio/#post-225483

    Cheers!
    Yigit

    #239698

    Thanks for your reply Yigit.

    but I mean the other images the ones in the portfolio item

    like this Portfolio item

    like this Portfolio item

    I want all images to not be links. the thumbnails can trigger the gallery to change without being a link right?

    #239700

    if I use CSS to take away the link than the thumbnail isn’t triggering the gallery

    #239884

    Hey!

    Please edit config-templatebuilder > avia_shortcodes > gallery.php, find this code on line 212:

    $output .= "<a class='avia-gallery-big fakeLightbox $imagelink $crop_big_preview_thumbnail $custom_link_class' href='".$link[0]."'  data-onclick='1' title='".$description."' ><span class='avia-gallery-big-inner' $markup_url>";
    							$output .= "	<img width='".$prev[1]."' height='".$prev[2]."' src='".$prev[0]."' title='".$title."' alt='".$alt."' />";
    			   if($caption) $output .= "	<span class='avia-gallery-caption'>{$caption}</span>";
    							$output .= "</span></a>";
    

    Replace it with:

    $output .= "<a class='nolightbox avia-gallery-big fakeLightbox $imagelink $crop_big_preview_thumbnail $custom_link_class' title='".$description."' ><span class='avia-gallery-big-inner' $markup_url>";
    							$output .= "	<img width='".$prev[1]."' height='".$prev[2]."' src='".$prev[0]."' title='".$title."' alt='".$alt."' />";
    			   if($caption) $output .= "	<span class='avia-gallery-caption'>{$caption}</span>";
    							$output .= "</span></a>";

    Remove browser cache then reload the page.

    Best regards,
    Ismael

    #240010

    ha thanks Ismael I now know where to edit. Except the thumbnails still trigger a lightbox.
    Is there a way for the thumbnails not to trigger a lightbox?

    #240623

    Hi!

    Yes, insert this code into the functions.php file (parent or child theme):

    
    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)
    {
        $link['custom_link_class'] = 'noLightbox';
        return $link;
    }
    

    Best regards,
    Peter

    #240863

    Hi Dude,

    Thanks for your reply. the lightbox is gone but it is still a link nojust opening in new page.

    Shouldn’t have mentioned the lightbox, sorry. I still want to trigger the gallery big picture but without it being a link to whatever, clicking on it must not be possible. Only to trigger.

    So thumbnails are not a link to anything only to activate/trigger the gallery.

    thanks

    #240996

    Hey!

    Please do the changes that I suggested above then edit js > avia.js, find this code on line 7:

    var aviabodyclasses = AviaBrowserDetection('html');
    

    Below, add this code:

    $('.avia-gallery-big').attr('href', '');
    

    Cheers!
    Ismael

    #241262

    can I create a “JS” folder with the avia.js in it in my child theme?

    #241524

    Hey!

    Yes, that is possible. Just add this on the child theme’s functions.php:

    /*
     * Register frontend javascripts:
     */
    if(!is_admin())
    {
    	add_action('wp_enqueue_scripts', 'avia_register_child_frontend_scripts', 100);
    }
    
    function avia_register_child_frontend_scripts()
    {
    	$child_theme_url = get_stylesheet_directory_uri();
    
    	//register js
    	wp_register_script( 'avia-default-child', $child_theme_url.'/js/avia.js', array('jquery'), 1, false );
    	wp_enqueue_script( 'avia-default-child' );
    }

    Create a js folder with the avia.js file inside.

    Regards,
    Ismael

    #241649

    i did what you said but still nothing

    isn’t there a way to replace the tag ?

    #241651

    I got it.

    I just deleted the link and replaced it with #

    $thumbs .= " <a href='#' data-rel='gallery-".self::$gallery."' data-prev-img='".$prev[0]."' {$class} data-onclick='{$counter}' title='".$description."' $markup_url><img {$tooltip} src='".$img[0]."' width='".$img[1]."' height='".$img[2]."'  title='".$title."' alt='".$alt."' /></a>";
    $first = false;
    }
    #242585

    Hi!

    Glad you solved the issue :)

    Regards,
    Peter

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘delete link (no lightbox) from AJAX porfolio image’ is closed to new replies.