Enqueue script in plugin is not working

Two reasons your code is not working. 1. Handle should be same i.e. ‘follow’ where as you are using the_follow and follow. 2. You have to execute statements in sequence i.e.(not sure) a) Register Script b) Localize Script c) Enqueue Script Ref: wp_localize_script // Register the script wp_register_script( ‘follow’, plugins_url(‘the-follow.js’, __FILE__) ); // Localize the … Read more

WordPress jquery files not being enqueued

I dont really see anything wrong on what I did previously. But in any case I changed the name of the file to navbar.js and then my functions.php looked like this: function scentology_scripts() { wp_enqueue_style( ‘scentology-local-fonts’, get_template_directory_uri() . ‘/fonts/raleway.css’ ); wp_enqueue_style( ‘scentology-style-fontawesome’, ‘https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css’ ); wp_enqueue_style( ‘scentology-style’, get_stylesheet_uri() ); wp_enqueue_script( ‘scentology-menu’, get_template_directory_uri() . ‘/js/navbar.js’, array(‘jquery’), ‘20151215’, … Read more

Exclude some scripts from removing unique scripts from head function

You are removing the hooks from the head that are normally used to register and enqueue scripts. Normally, but not necessarily. You can also skip the intermediate hook and enqueue scripts directly into wp_head like this: add_action(‘wp_head’,’wpse240186_enqueue_jquery’); function wpse240186_enqueue_jquery() { wp_register_script(‘jquery’, ‘path_to/jquery.min.js’); wp_enqueue_script(‘jquery’); } In that way you can move scripts in general to the … Read more

how to en-queue jQuery to load before the tag

Try adding this to functions.php <?php // Custom scripting to move JavaScript from the head to the footer function remove_head_scripts() { remove_action(‘wp_head’, ‘wp_print_scripts’); remove_action(‘wp_head’, ‘wp_print_head_scripts’, 9); remove_action(‘wp_head’, ‘wp_enqueue_scripts’, 1); add_action(‘wp_footer’, ‘wp_print_scripts’, 5); add_action(‘wp_footer’, ‘wp_enqueue_scripts’, 5); add_action(‘wp_footer’, ‘wp_print_head_scripts’, 5); } add_action(‘wp_enqueue_scripts’, ‘remove_head_scripts’); ?>

Can´t access child theme´s scripts dependencies found in parent

If the parent theme bundles all vendor scripts in one file, you can’t require/enqueue them separately. From WP’s point of view, they are one single resource/dependency. Look into any page’s source-code or use a plugin (such as “debug this”) to get the script’s register name so you could specify it as dependency. In your case … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)