Support » Plugin: Business Directory Plugin | GeoDirectory » geodir-map.min.js loaded on blog pages

  • Resolved woorooo

    (@woorooo)


    Hi,

    I’m having trouble with geodir-map.min.js being loaded on pages where it probably should be. I’ve also noticed that it’s not being loaded on your demo websites at all.

    Is there something wrong with my installation or am I missing something?

    Thanks,

    Roman.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello Roman,

    we will have to check your setup and settings.

    could you please create a support ticket for this, our team will check it?
    https://wpgeodirectory.com/support/

    Regards

    Thread Starter woorooo

    (@woorooo)

    No worries, I just realized that it’s a map lazy loading script. I’ll handle it myself 🙂 Thank you.

    Thread Starter woorooo

    (@woorooo)

    @1naveengiri is there some php filter snippet that could dequeue this geodir-map.min.js for certain pages?

    • This reply was modified 1 month, 3 weeks ago by woorooo.

    Hello

    please try this snippet

    
    add_filter( 'geodir_lazy_load_map', 'geodir_lazy_load_map_custom_callback');
    function geodir_lazy_load_map_custom_callback( $lazy_load ){
    	if( !geodir_is_geodir_page()){ // you can add your page check here.
    	    $lazy_load = '';	
    	}
        return $lazy_load;
    }
    

    Regards

    • This reply was modified 1 month, 3 weeks ago by 1naveengiri.
    Thread Starter woorooo

    (@woorooo)

    Worked flawlessly, thank you so much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.