Support » Plugin: FancyBox for WordPress » cant connect my images to open with fancybox

  • I found a very attractive gallery plugin called Coand Gallery and I installed it on my wordpress
    https://github.com/andreicocari/coand-wp-gallery
    and I tried to modify this plugin to open the image attribute in fancybox.
    Originally it opened in lightbox but I would like to open in fancybox
    I also have installed a FancyBox plugin and it working fine on every other images exept on the Coand Gallery images

    Here is the issue http://galeart.eu.org/gallery/
    but here it works nicely : http://galeart.eu.org/portfolio/

    I think the problem is on this line
    $html .= ‘‘;

    please help me to solve this problem , and please have in mind that I am a totally beginner in coding

    // Retrieve each galleries in the post
        foreach ($galleries_array as $gallery_id) {
            $gallery = get_post_gallery( $gallery_id, false );
            $attachments_ids_string = $gallery['ids'];
            $attachments_ids = explode(",", $attachments_ids_string);
            $thumbnails_srcs = $gallery['src'];
    
            $gallery_title = get_the_title( $gallery_id );
    
            for ($i=0; $i < sizeof($thumbnails_srcs) ; $i++) {
                $image_attributes = wp_get_attachment_image_src( $attachments_ids[$i], 'large' );
    
                $html .= '<li data-pile="'. $gallery_title .'">';
          	    $html .=     '<a href="'. $image_attributes[0] .'"class="fancybox">';
                 $html .=        '<span class="tp-info">';
                 $html .=            '<span>Some title</span>';
                 $html .=        '</span>';
                $html .=        '<img src="'. $thumbnails_srcs[$i] .'" />';
                $html .=     '</a>';
             /*   $html .= '</li>';*/
    
            }

    https://wordpress.org/plugins/fancybox-for-wordpress/

  • The topic ‘cant connect my images to open with fancybox’ is closed to new replies.