JQuery Plugins in WordPress
Your main issue with your code is that you aren’t wrapping your JS in a <script> element. <?php /* Template Name: Price Chart */ /** * Enqueue the table sorter script */ function load_table_sorter_scripts() { //wp_enqueue_style( ‘style-name’, get_stylesheet_uri() ); wp_enqueue_script( ‘tablesorter’, get_template_directory_uri() . ‘/js/jquery.tablesorter.min.js’, array(‘jquery’), ‘1.0.0’, true ); } add_action( ‘wp_enqueue_scripts’, ‘load_table_sorter_scripts’ ); // Now … Read more