14

How to Remove MyListing Map Functionality and API Calls

Powered by WPCodeBox

Optimize your MyListing website’s performance by removing unnecessary map functionality and API calls with this code snippet, ideal for sites not utilizing map services.


<?php 

/**
 * Author: MyListing Club
 * Author URI: https://mylisting.club
 */

add_action( 'wp_enqueue_scripts', function() {
    wp_dequeue_script( 'google-maps' );
    wp_dequeue_script( 'mylisting-maps' );
    wp_dequeue_style( 'mylisting-maps' );
}, 1000 );

Other Snippets

WPCodeBox is a WordPress Code Snippets Manager that allows you to share your WordPress Code Snippets across your sites.