Tagged: ajax portfolio
-
AuthorPosts
-
March 17, 2014 at 1:21 pm #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
March 18, 2014 at 6:35 pm #239509Hey f!
Please refer to this topic https://kriesi.at/support/topic/disable-lightbox-in-portfolio/#post-225483
Cheers!
YigitMarch 18, 2014 at 11:01 pm #239698Thanks for your reply Yigit.
but I mean the other images the ones in the portfolio item
I want all images to not be links. the thumbnails can trigger the gallery to change without being a link right?
March 18, 2014 at 11:05 pm #239700if I use CSS to take away the link than the thumbnail isn’t triggering the gallery
March 19, 2014 at 7:50 am #239884Hey!
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,
IsmaelMarch 19, 2014 at 11:52 am #240010ha 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?March 20, 2014 at 10:50 am #240623Hi!
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,
PeterMarch 20, 2014 at 8:52 pm #240863Hi 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
March 21, 2014 at 4:24 am #240996Hey!
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!
IsmaelMarch 21, 2014 at 5:16 pm #241262can I create a “JS” folder with the avia.js in it in my child theme?
March 22, 2014 at 6:29 am #241524Hey!
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,
IsmaelMarch 22, 2014 at 6:06 pm #241649i did what you said but still nothing
isn’t there a way to replace the tag ?
March 22, 2014 at 6:09 pm #241651I 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; }
March 25, 2014 at 9:21 am #242585Hi!
Glad you solved the issue :)
Regards,
Peter -
AuthorPosts
- The topic ‘delete link (no lightbox) from AJAX porfolio image’ is closed to new replies.