SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2012
    Location
    Pune, Maharashtra, India
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multiple Image gallery for a k2 item.

    Hi
    I am working for a site for which 'am using k2 component.
    I am able to implement all the features required in the site with k2 except one.
    The site requires the k2 items to have multiple galleries under different labels.
    I am not being able to figure out how to do that for k2 item. Also the images of the galleries need to appear in pop-up when a site visitor clicks over a particular gallery link.

    If one can tell me how to add an extra file upload field in the k2 form, that will also be helpful.

    if anyone know how to do it, please help me..


    Thanks in advance..!

  2. #2
    SitePoint Zealot
    Join Date
    Jun 2011
    Location
    Kolding, Denmark
    Posts
    108
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    To add lightbox support for gallery thumbnails, you can use some plugin or include required lightbox js and css files and use code like this:
    PHP Code:
    function my_filter_attachment_link($markup$id$size$permalin) {
        if (!
    $permalink && $size == 'thumbnail') {
            
    $attachement get_post($id);
            
    $markup str_replace'<a href''<a rel="lightbox[galleryid-'$attachment->post_parent .']" href'$markup );
        }
        return 
    $markup;
    }
    add_filter('wp_get_attachment_link''my_filter_attachment_link'104); 


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •