BuddyBoss Home – Web Support Forums Themes Boss. theme Gallery styling + lightbox (and comments)

Viewing 15 posts - 1 through 15 (of 15 total)
  • Question

    #43259
    @keen

    Hi,

    Does Boss have the capability of styling WP gallery images? I have a custom post type which allows the upload of a gallery of images (via ACF gallery field). When the images are displayed, it's a standard WP Gallery (pretty ugly, and not in keeping with Boss styling). Additionally, when the images are clicked on, it would be great if they opened using the Boss lightbox.

    Is this possible?

    Many thanks

    Answers

    #43321

    Deepak BuddyBoss
    Participant
    @deepak

    @keen the script we are using should do that by default. But for some reason the action is not firing. Let me get Varun on this for you.

    #43364
    @keen

    Ok – will Varun reply here?

    Should BuddyBoss handle the gallery AND open them in the lightbox, or just the lightbox effect?

    #43457

    Deepak BuddyBoss
    Participant
    @deepak

    @keen he should reply here, and it will only handle the lightbox

    #43826
    @vapvarun

    Hi @keen, I am working on it to bundle it as function

    
    
    jQuery(".gallery .gallery-item .gallery-icon").addClass("buddyboss-media-photo");
        
    jQuery(".gallery .gallery-item .gallery-icon a").addClass("buddyboss-media-photo-wrap");
    
    

    I will post the function within few hours.

    Regards

    #43842
    @vapvarun

    Hi @keen , you can include it inside your child theme folder functions.php

    
    add_action('wp_head', 'add_custom_gallery_class');
    
    function add_custom_gallery_class()
    {
     $script= '<script type="text/javascript">';
     $script.='$(".gallery .gallery-item .gallery-icon a").each(function(i) {
        $(this).attr("id", "media-" + i);
        });
    
    function add_gallery_class() {';
     $script.='jQuery(".gallery .gallery-item .gallery-icon").addClass("bbmedia-grid-item");
               jQuery(".gallery .gallery-item .gallery-icon a").addClass("buddyboss-media-photo-wrap");
               jQuery(".gallery .gallery-item .gallery-icon a img").addClass("buddyboss-media-photo");
               ';
     
     $script.='}
       //window.onload = add_gallery_class;
      jQuery(document).ready(function(){add_gallery_class();});';
     $script.='</script>';
     echo $script;
    }
    

    Above codes works only with BuddyBoss Media plugin is active ,nothing related to Boss theme
    Regards
    Varun Dubey

    #43844
    @keen

    Hi Varun,

    Thanks for this. I've added the code to my functions file and it hasn't changed anything. Do you have an example of how it should be behaving?

    Many thanks,
    Lorraine

    #44902
    @keen

    Hi,

    It's been almost 3 weeks since I responded saying that the code provided had not taken any effect.

    Please can you advise on how to fix this issue?

    Many thanks.

    #44935
    @vapvarun

    Hi @keen,

    It's not any issue. Please add those codes to child theme function.php and when you create gallery link media to file not to the attachment url.
    Regards
    Varun Dubey

    #44936
    @vapvarun

    Above codes will only WordPress default gallery , if you are using any third party codes to create the gallery those gallery class and structure will not be predefined. You can check the codes we are modifying the existing set of deep classes and modifying it with new.
    Regards

    #44944
    @keen

    Hi Varun,

    I have created a standard gallery to test this out and it seems to be working ok, but the images are very dark as if they have an overlay.

    Also, if I click comment or like, it closes the lightbox down.

    I don't have a plugin installed to handle media apart from Buddyboss Media.

    Any ideas on what could be causing that?

    Thanks.

    #44966
    @vapvarun

    Hi @keen we have not created any comment section for post gallery images and it will be typical to implement, each gallery image is not part of BB media where we can post comment.

    #44967
    @vapvarun

    my personal suggestion for gallery images with comments, you can take a look of this plugin
    http://codecanyon.net/item/social-gallery-wordpress-photo-viewer-plugin/2665332
    Regards

    #45438
    @keen

    Hi Varun,

    I've made do with another plugin and removed the code.

    I will wait for you to improve how images are handled as I know there are other users requesting the same features as I have in the past. I don't want Facebook comments to be used on the site and have discounted the suggested plugin previously, however this style of lightbox with comments is exactly what I'm after.

    You can close this ticket down.

    Thanks.

    #45449
    @vapvarun

    Thanks @keen, We are working on media plugin to improve it.

Viewing 15 posts - 1 through 15 (of 15 total)
  • The question ‘Gallery styling + lightbox (and comments)’ is closed to new replies.