They are put in via the text editor view.
I checked the link that you posted. Am I right in assuming I can add javascript, if I do it as described in the ‘JavaScript in Posts
‘ section?
I use conditional statements in my function file to include JS on individual pages when needed. All of my sites use custom themes from scratch.
But you can try the method described in ‘Javascript in Posts’ as I am sure it will work as well.
If you have any trouble, ask in “Developing” Forum or WordPress.stackexchange.com that is where the programmers ‘hang out’.
]]>The JS is used on 2 pages/posts.
It is a child theme.
My coding experience level is pretty low (basic HTML), but I am working with an experienced coder who is new to WP. He has informed me that he found a WP plugin called ‘Per page add to head’, and it seems work well for our needs here.
Thanks!
]]>
// enqueue styles
function load_my_scripts_styles() {
if (is_page('personnel')) {
// Loads Perfect Scrollbar JavaScript file.
wp_enqueue_script('PerfectScrollbarjs', get_template_directory_uri() . '/library/js/perfect-scrollbar.min.js', array('jquery'),'', true );
// Loads Perfect Scrollbar CSS file.
wp_enqueue_style('PerfectScrollbarCSS', get_template_directory_uri() . '/library/css/perfect-scrollbar.min.css', false ,'');
}
}
add_action('wp_enqueue_scripts', 'load_my_scripts_styles');
]]>