Hi guys - I had my javascript to filtering and it worked great in Codepen. I just transferred it to a WP page and the “active” parts of the JS is kind of stuck. The buttons work but not fully (no display on default even though ALL should display.
Update: This is solved. Wordpress have specific display on JS and more.
Solution:
In the functions.php, add:
function my_theme_scripts_function() {
wp_enqueue_script( 'myscript', get_template_directory_uri() . '/js/myscript.js');
}
add_action('wp_enqueue_scripts','my_theme_scripts_function');
And then just put your in your content through the editor in WP.
Credit: https://www.collectiveray.com/wp/tips/add-javascript-to-wordpress