• Resolved Pamela

    (@infoknutsford-softwarecouk)


    I was using

    wp_enqueue_script(‘gmw-fl’, get_template_directory_uri() . ‘/assets/js/f2_locations.js’, array(‘jquery’), GMW_VERSION, true);

    to call my own version of f1.js but since downloading the most recent version of geo-my-wp it is being completely ignored and I have had to use

    <script type=”text/javascript” src=”<?php echo get_template_directory_uri() . “/assets/js/f2_locations.js”; ?>” ></script>

    instead. I was wondering why the wp_enqueue_script is now being ignored, Thanks

    https://ww.wp.xz.cn/plugins/geo-my-wp/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eyal Fitoussi

    (@ninjew)

    Hello Pamela, I am now on an update of the plugin. I will look into this issue.

    Thank you.

    Plugin Author Eyal Fitoussi

    (@ninjew)

    Hi,
    to solve the issue copy paste the below script to the functions.php file of your theme:

    function gmw_register_custom_fl_script() {
    	wp_deregister_script( 'gmw-fl' );
    	wp_register_script( 'gmw-fl', get_template_directory_uri() . '/assets/js/f2_locations.js', array('jquery'), GMW_VERSION, true );
    }
    add_action( 'wp_enqueue_scripts', 'gmw_register_custom_fl_script' );

    and remove any of the previous scripts you added.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘wp_enqueue_script’ is closed to new replies.