Adding single listing scripts/styles to custom template
-
I’m using a custom template for the single-listing.php.
I’ve used my own theme (Canvas by woothemes) single post template, and included the wp-listings code. https://pastebin.com/cAYFEruA
The issue I’m having is that my custom single-listing.php is in my child theme directory. Because of this the following code doesn’t work because the file paths are different:
add_action('wp_enqueue_scripts', 'enqueue_single_listing_scripts'); function enqueue_single_listing_scripts() { wp_enqueue_style( 'wp-listings-single' ); wp_enqueue_style( 'font-awesome' ); wp_enqueue_script( 'jquery-validate', array('jquery'), true, true ); wp_enqueue_script( 'fitvids', array('jquery'), true, true ); wp_enqueue_script( 'wp-listings-single', array('jquery, jquery-ui-tabs', 'jquery-validate'), true, true ); }
None of these are loading in my custom template.
What’s the best way to include them correctly?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding single listing scripts/styles to custom template’ is closed to new replies.