• I’m trying to load javascript in a custom plugin but it doesn’t work unless I take out the version parameter:

    wp_enqueue_script( 'ajax-pagination', get_template_directory_uri() . '/js/ajax-pagination.js', array( 'jquery' ), '1.0', true );

    only works if I use:

    wp_enqueue_script( 'ajax-pagination', get_template_directory_uri() . '/js/ajax-pagination.js', array( 'jquery' ), true );

    I don’t understand what version number is? Is it something I make up and put in the .js because the wordpress codex says “should be included if a version number is available ” but how do I make it available?

  • The topic ‘wp_enqueue_script version number isn't working’ is closed to new replies.