if you want it on all single posts as well as pages & custom post types, use is_singular()
instead of is_single()
& just in case you’re using it on the template, this code goes in functions.php
UPDATE IN RESPONSE TO THE COMMENTS
write this code just above your wp_head()
function in header.php
global $wp_scripts;
var_dump($wp_scripts);
This will display on the site all the info related to scripts registered in wordpress to be displayed. Read it & then see what scripts you want to display & what scripts are to be removed with wp_dequeue_script
To determine which page you are removing scripts from, you may look for various Conditional Tags
Related Posts:
- Move WordPress native javascript to bottom of page?
- RequireJS in custom theme. Working Example
- How to get a jQuery script to run on a page?
- Including javascript for a shortcode
- Asynchronous Javascript Loaders
- wp_enqueuescript won’t load in footer even with true value set?
- How wp_enqueue_script works?
- How do I get my page to load the jQuery UI Effects library?
- Script won’t execute in the media manager
- How to properly add Bootstrap and JQuery Javascripts?
- Enqueuing javascript files
- Searching multiple tags and adding jQuery dependant script onto page template?
- Plugin Scripts no loading on options page
- How to enque js script in footer that are not in .js file?
- Loading scripts on a single page plants the script in the footer
- Using WP functions inside javascript
- Including Older Version of jQuery for IE7/IE8
- How to make JQuery load on top of head tag before everything
- JavaScript code do not works on online server
- Bootstrap with separate js File
- How to add JS snippet before closing tag?
- Enqueue javascript that inserts custom php widget into jQuery-constructed div
- How to Run a jQuery Script after a Javascript Script has Finished in WordPress
- javascript not loading in wordpress
- bootstrap-slider.js by seiyria not working in wordpress
- What does [object Object] mean? (JavaScript)
- Javascript Runtime error: $ is undefined
- Javascript TypeError: Cannot read property ‘indexOf’ of undefined
- How to read data From *.CSV file using javascript?
- How to call a webservice method from an html page [javascript] with out refresh the page
- How can I remove all CSS classes using jQuery/JavaScript?
- Enqueue core jQuery in the footer?
- How to correctly include jquery-ui effects on wordpress
- I want to enqueue a .js file to my child theme
- Concatenate and minify dependencies for enqueued JavaScript files
- tinymce is not defined when not using wp_editor
- Adding jquery and thickbox to WordPress theme
- jQuery UI Datepicker not working
- Draggable item in custom gutenberg block
- Best Way to Include Scripts on a Specific Template Page
- How to include jquery validate in a template
- chosen jquery library not loading – is not a function error
- Unable to run jQuery script in my template file
- Enqueue jQuery in WordPress
- WordPress Script Loading/Unloading — wp_deregister_script(‘jquery’)
- Enqueuing Script in functions.php vs on the page
- How to add unique image class to WordPress
- Dropzonejs with WPCF7 [closed]
- wp_ajax() question.. not using wp_enqueue_script?
- Jquery conflict
- Why isn’t jQuery 2.1 loading in the header?
- WP Admin missing icons, numerous JavaScript errors, but only when SCRIPT_DEBUG is false
- WordPress loads Jquery Automatically – is my idea correct to add it to the footer?
- Problem in loading javascript in footer
- Enqueue WordPress jQuery after it’s been deregistered by a plugin
- How to embed JS data viz in a simple WordPress website
- WooCommerce Ajax Cart Update Stopped Working
- Rhyzz Repeatable-fields javascript in php and wordpress
- how to en-queue jQuery to load before the tag
- Plugins loading multiple copies of JQuery
- Cannot enqueue jQuery correctly using Google CDN
- Yoast SEO breaking media upload
- window.onload wont execute in wordpress
- How register library to use jquery correct
- WP Customizer compare and set a value via javascript
- “JQMIGRATE: Migrate is Installed” How do I find the problem code? [duplicate]
- Referrer URL with jQuery or Javascript – Cache & Referrer URL Issue
- Using Foundation 5 in WordPress Administration Area
- Ajax Validation for reCaptcha
- Using jquery and javascript in WordPress
- Run a jquery script on on a certain template page
- Run JS function when JQ enqueued
- Can’t delete the default jQuery in the theme
- How to load jQuery in TOP of wp_footer?
- oEmbed Video in Modal
- Include Jquery libraries in wordpress theme?
- AJAX Success Function using JS substr() fails in WP 4.1 vs 4.0
- Calling multiple scripts using wp_enqueue_script
- Override parent theme deregister
- Show and hide element when URL contains certain section of text?
- Defer Parsing of Scripts
- Orderby post__in Not Working Correctly?
- jQuery Plugin Uncaught TypeError: jQuery(…).slider is not a function
- Notify user we would like them to clear their cookie. Provide a working button to clear cookies for user
- Call full image url instead of stylsheet directory url in JS for Infinite Scroll Function
- comment-reply.js disables any other form javascript
- File not enqueueing
- Enqueue script, taking no effect [closed]
- How to blur the_post_thumbnail() via blur.js (jquery)?
- Custom Javascript not working? [closed]
- Displaying contents of a tab
- How to deregister scripts all at once
- Object [object Object] has no method ‘slides’
- Trying to get fittext to work in WordPress
- Add jQuery function to media button
- TypeError: $ is not a function Error using parallax effect in WordPress Template [duplicate]
- jQuery append only works if I select html in admin section [closed]
- Javascript Loading Effect to URLs
- Use WordPress Built In Jquery
- Uncaught ReferenceError: tippy is not defined