• Hi, we are using the latest jquery version in our theme, our scripts are enqueued this way :

    // deregister the jquery version bundled with wordpress
    wp_deregister_script('jquery');
    
    // register scripts
    wp_register_script( 'modernizr', get_template_directory_uri() . '/bower_components/modernizr/modernizr.js', array(), '1.0.0', false );
    wp_register_script( 'jquery', get_template_directory_uri() . '/bower_components/jquery/dist/jquery.min.js', array(), '1.0.0', false );
    wp_register_script( 'custom', get_stylesheet_directory_uri() . '/js/custom.min.js', array('jquery','modernizr'), '1.0.0', true );
    
    // enqueue scripts
    wp_enqueue_script('custom');

    But the jquery wp_deregister_script seems to conflict with the way you’re enquiing your assets, because I get this js error :

    Uncaught TypeError: $(...).live is not a function

    Changing .live (now depcrecated) to .on in the different files using seems to partly fix the issue (although it creates some problems).
    Could you look into it?

    https://www.ads-software.com/plugins/w4-post-list/

Viewing 1 replies (of 1 total)
  • Plugin Author Shazzad Hossain Khan

    (@sajib1223)

    If .on('click' fix the issue, and also compatible with the default jquery version, then i will definitely change it.

    But, WordPress always suggest to make plugin compatible with core WP environment, and dequeuing any default script is not recommended.

    Perhaps, you can edit out plugin and replace what you have to for now, i will look at it on next release.

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Ajax pagination not working’ is closed to new replies.