Remove Lightbox in V2

This topic contains 7 replies, has 3 voices, and was last updated by  tabiLabs Inc 5 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: , ,

  • Author
    Posts
  • #479386

    tabiLabs Inc
    Full Member
    Post count: 83

    Hello,
    The lightbox seems to be conflicting with my theme’s lightbox (the first image opens with one lightbox, and then switches to the other!).

    I saw this for V1 (https://wpgeodirectory.com/support/topic/romove-default-gallery-lightbox-to-use-my-own/) but can’t find the option in V2…

    Thanks.

    Love V2 by the way!

    #479390

    tabiLabs Inc
    Full Member
    Post count: 83

    You can see the problem here:

    https://www.accessible-japan.com/places/japan/tokyo/chuo/attractions/ginza/#post_images

    It doesn’t matter which picture you open first, it is always different than the next image if you click left or right.

    My theme uses Magnific Popup

    #479448

    Kiran
    Moderator
    Post count: 7069

    Hi Josh,

    To disable lightbox from the listing detail page photos do following things.

    – WordPress > CPT(Places) > Tabs > Delete exisitng Photos tab
    – From left sidebar “Custom Fields” add “Shortcode”
    – Set name Photos, set icon you want and set following shortcode content.

    [gd_post_images type="gallery" ajax_load="0" slideshow="0" show_title="1" animation="slide" controlnav="0" link_to=""]

    Let us know.

    Thanks,
    Kiran

    #480711

    tabiLabs Inc
    Full Member
    Post count: 83

    Hello,

    Thank you for your reply.

    Unfortunately, it didn’t work as I hoped.

    It shows the images, but you cannot view a larger version.

    I think my initial question was a bit unclear, sorry!
    I want lightbox, just not the geodirectory one – I want to use the built in one from my theme (so it is the same everywhere on the site).

    What are the variables for link_to=””?

    Thank you

    #480942

    Alex Rollin
    Moderator
    Post count: 27815

    You can find all the available settings in a shortcode builder UI, which you can always find on the Tabs UI page in a shortcode field. Just add shortcode field and the shortcode builder button will show up. Link to options include none, post, and lightbox.

    GD Post Images only links to the modal framework included with GD. If you want to customize it you can see some general instructions here to cover what is involved.
    https://wpgeodirectory.com/docs-v2/faq/customizing/

    #481257

    tabiLabs Inc
    Full Member
    Post count: 83

    Is there a way to dequeue the gd-lity.js script in functions.php?

    I temporarily commented out the lines in where it is queued in class-geodir-frontend-scripts.php and it fixed my problem…

    #481341

    Kiran
    Moderator
    Post count: 7069

    Hello Josh,

    Use following snippet to dequeue lity js. It may affect some feature like GD contact form + ninja form and claim listing popup.

    
    
    /**
     * Dequeue gd_lity JS.
     */
    function gd_snippet_190417_dequeue_lity() {
    	// Backend pages
    	if ( wp_script_is( 'geodir-lity', 'enqueued' ) ) {
    		wp_dequeue_script( 'geodir-lity' );
    	}
    
    	// Frontend pages
    	if ( wp_script_is( 'geodir_lity', 'enqueued' ) ) {
    		wp_dequeue_script( 'geodir_lity' );
    	}
    }
    //add_action( 'admin_enqueue_scripts', 'gd_snippet_190417_dequeue_lity', 999 ); // Backend pages
    add_action( 'wp_enqueue_scripts', 'gd_snippet_190417_dequeue_lity', 999 ); // Frontend pages
    #481351

    tabiLabs Inc
    Full Member
    Post count: 83

    Thank you SO much!

    I hope a “turn off lightbox” option is added to the front end like in V1, but in the meantime, thanks!

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount