Hot answers tagged

2

I don't think the name (typeahead bundle) may contain spaces.


1

You could use wp_print_scripts and wp_print_styles actions to timely and properly access to enqueued scripts and styles. add_action( 'wp_print_scripts', 'cyb_list_scripts' ); function cyb_list_scripts() { global $wp_scripts; $enqueued_scripts = array(); foreach( $wp_scripts->queue as $handle ) { $enqueued_scripts[] = $wp_scripts->...


1

do_action doesn't quite work like that. When you call do_action('crunchify_print_scripts_styles') WP looks at its list of registered actions and filters for any that are attached to a hook called crunchify_print_scripts_styles and then runs those functions. And you probably want to remove this: add_action( 'wp_enqueue_scripts', '...


1

Copying from the answer here regarding variable scope Variables inside a function are only available inside that function. Variables outside of functions are available anywhere outside of functions, but not inside any function. Because of that, you need to add your $translations array within the kvkoolitus_load_comment_validation function, like ...


1

You need to wrap your text with <?php and ?>. Like this: <?php function my_scripts() { wp_enqueue_script( 'jquery' ); wp_register_script( 'parallax', get_template_directory_uri() . '/parallax.js', array( 'jquery' ), NULL, true ); wp_enqueue_script( 'parallax' ); } add_action( 'wp_enqueue_scripts', 'my_scripts' ); ?> Otherwise, ...



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