Reply To: Can't use wp_footer on one page where I need a map. Any work-arounds?

Home Forums MapPress Support Can't use wp_footer on one page where I need a map. Any work-arounds? Reply To: Can't use wp_footer on one page where I need a map. Any work-arounds?

#12329
Chris
Keymaster

    Hi,

    I don’t think WordPress offers any way to output only specific queued scripts.

    You could take a look at a normal page with a map and just copy the google/mappress script tags into your checkout page template.  Call the MapPress print_maps() function to output the map data after those tags:

    <?php
    global $mappress;
    $mappress->print_maps();
    ?>

    Perhaps there’s a way to conditionally not load the other scripts on the checkout page?   Or you could dequeue them before the wp_footer() call:

    http://codex.wordpress.org/Function_Reference/wp_dequeue_script