New Landing How can we help? Themeforest Theme Support Dante Overriding gallery in Child theme

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Dante
  • #219613
    Armannas
    Member
    Post count: 17

    I am trying to get the gallery lightbox functionality working as this is broken(too bad it wasn’t fixed in v3.16).
    I tried editing the parent theme using the fix provided in http://www.swiftideas.com/forums/topic/lightbox-not-loading-2/#post-199618 and it works great.

    However, when I try to do the same in the Child’s theme I only get a blank page. What I tried:

    Copied gallery.php from dante/swift-framework/page-builder/builder/shortcodes and pasted it in a created directory dante-child/swift-framework/page-builder/builder/shortcodes

    I edited the child gallery.php in line 58:
    $main_slider .= "<li><a href='{$image['url']}' class='ilightbox' rel='ilightbox[gallery-{$gallery_id}]'><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></a>";

    changed by:
    $main_slider .= "<li><a href='{$image['url']}' class='view' data-rel='ilightbox[gallery-{$gallery_id}]'><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></a>";

    In the Child theme’s function.php I added the following at the bottom:

    require_once( get_stylesheet_directory() . 'dante-child/swift-framework/page-builder/builder/shortcodes/gallery.php' );

    The lest step results in a blank page.

    Thanks in advance

    #219614
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    You can’t override that file in the child theme, only root folder files can be overwritten

    – Kyle

    #219676
    Armannas
    Member
    Post count: 17

    Hi Kyle,

    Will the problem that the gallery cannot be ‘ lightboxed’, be fixed anytime soon? There was already a topic on this and your colleague Mohammad gave a manual fix, but that is not ideal due to updates overriding…….

    #219680
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    I will forward this to the developer so he can include the fix in the next update, I’m not sure if Mohammad informed him about the issue. Sorry about that

    – Kyle

    #219789
    Armannas
    Member
    Post count: 17

    Thanks for taking measures.

    #219804
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    No problem. thanks Kyle

    -Rui

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register