Tag Info

Hot answers tagged


WordPress already has a built-in Page Template hierarchy to handle this exact situation. You don't need to mangle your page.php code or add a filter, just follow the naming conventions for the hierarchy: custom template file : The Page Template assigned to the Page. See get_page_templates(). page-{slug}.php - If the page slug is recent-news, 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() . ...

Only top voted, non community-wiki answers of a minimum length are eligible