custom post with loading script per single post

What if you completely remove the loadDonateScripts function and just add the conditional before enqueuing the scripts like in the the following: function donate_adding_scripts() { if (is_single()) { global $post; if($post->ID==”8436″){ // only for post Id = 8436 wp_register_script(‘donateParsleyJs’, get_template_directory_uri() . ‘/js/parsley.min.js’, array(‘jquery’),’1.11.1′); wp_enqueue_script(‘donateParsleyJs’); wp_register_script(‘donateParsleyHeJs’, get_template_directory_uri() . ‘/js/he.js’); wp_enqueue_script(‘donateParsleyHeJs’); wp_register_script(‘donateJs’, get_template_directory_uri() . ‘/js/donateJs.js’, array(‘jquery’),’1.11.1′, true); … Read more

Dequeue set-post-thumbnail.min.js

You should be able to dequeue like normal. Despite the complexity of the function, it is really just enqueueing scripts and styles. Tested with the admin bar script on the front end: add_action( ‘wp_enqueue_scripts’, function() { wp_dequeue_script(‘admin-bar’); } ); You just want admin_enqueue_scripts and set-post-thumbnail: add_action( ‘admin_enqueue_scripts’, function() { wp_dequeue_script(‘set-post-thumbnail’); } ); I am not … Read more

How can I remove the site URL from enqueued scripts and styles?

Similar to Wyck’s answer, but using str_replace instead of regex. script_loader_src and style_loader_src are the hooks you want. <?php add_filter( ‘script_loader_src’, ‘wpse47206_src’ ); add_filter( ‘style_loader_src’, ‘wpse47206_src’ ); function wpse47206_src( $url ) { if( is_admin() ) return $url; return str_replace( site_url(), ”, $url ); } You could also start the script/style URLs with a double slash … Read more

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