Autocomplete or suggest from post titles inside plugin
In order to properly enqueue a script you must use the wp_enqueue_script like this : wp_enqueue_script( ‘suggest’, get_template_directory_uri() . ‘/js/path/to/suggest.js’, array(‘jquery’), ‘1.0.0’, true ); The second parameter is the path to your JavaScript file, the third parameter is the dependencies the script relies on (since suggest is a jquery plugin, it must be loaded after … Read more