You can do something like this :
// remove the script from the queue if were are on the post ID 11
add_action('wp_enqueue_scripts', 'remove_script_specific_post');
function remove_script_specific_post(){
if( 11==get_the_ID() ){
wp_dequeue_script('my_script_handle');
}
}
Provided that the script has been added with wp_enqueue_script
Related Posts:
- Keyboard shortcut for updating a page or post?
- Ajax Load More Posts in Category Page
- Get the current post ID as a variable in Javascript
- How to create WP Editor using javascript
- Dynamically update post title in admin page
- Add javascript when post is published
- Get post from custom REST endpoint in Gutenberg
- Add confirmation popup on “Move to Trash”
- Create a separate JS application for an individual post?
- Convert a complex webpage into WP theme
- Add scripts on custom post add/edit pages Not Working
- Injecting JavaScript into a Post with WP3.x
- How can I get a post field value using javascript?
- Custom post preview without saving
- Block Editor: Reset Reusable Blocks to last saved record
- Ajaxify This Code
- Integrate OpenStreetMap on WordPress
- Only show a Post once in 10 visits
- In post.php how can I remove onbeforeunload?
- Navigate through the posts using keyboard arrows
- Call current post URL in ajax
- Get content from WordPress posts in Boostrap modal window – Javascript side?
- Insert specific information to a posts of a predefined category
- WordPress as CMS: How to manage/handle images assigned to a post as full-sized background images in a slideshow?
- Using the loop to set locations for all posts on a single google map
- Insert JavaScript in a blog post or a new page?
- Why is it recommended to insert JS through the theme, plugin, etc rather than in the post directly?
- WordPress React re-rendering to many times
- Ajax post doesnt call succes after got the response
- Blog Post slider not working
- Colorbox not working on native WordPress gallery when gallery is loaded thru AJAX
- testing result of $.post with json_encode
- Loading posts outside wordpress
- Front end post delete error confirmation and success message
- Assign specific ads to specific categories/posts
- WP Rest API feature image breaking react component
- How can I add a custom caclulation form in post?
- How do I save JS classes being applied to the WP dashboard via custom plugin?
- WordPress custom post_status after 6.6 version
- How to retrieve text only from wp_content() not from wp_excerpt()?
- Function to execute when a post is moved to trash .
- Set tags for a post – without tag creation
- Add existing images from Media Library in to custom gallery
- Limit on the max number of words per post?
- How can I safely increase the character limit for post passwords?
- Fatal error: Call to undefined function post_exists()
- WP_Query to work with custom view
- Edit a post from frontend. post_tags get saved, but not separated
- Get the user type of an author
- Related posts display randomly by tag
- Order Posts by Alphabetical for Each Letter
- Edit meta data does’t work with custom sql
- Restrict access to the Trash folder in Posts
- Post custom permalink results in 404 for archive page
- Check if Currently on Static Posts Page
- get next next post in single.php
- how “manage_posts_custom_column” action hook relate to “manage_${post_type}_columns” filter hook?
- How do I get the slug of a custom taxonomy category of a post?
- Featured Posts for Category Pages
- Fatal error post.php help :(
- Cannot Update A Post, 404 Error
- Hiding posts in a list from specified categories
- Disable Post/Page comment emails for creators
- Changing html lang depending on author
- Define a name to the posts slug
- Get post id in wordpress action?
- How many post WordPress can handle?
- Create an article from another Java application
- WP_Query do not load specifed number of post
- Display most recent post in full, excerpts of older posts
- The post loop doesn’t work
- Buddypress activity id
- Modify WP_Post before processing
- How to rename “Publish” metabox title in post screen
- Tags to Post-ID mysql query. Tag Search
- Specifying # of Posts per page using inline post plugin (:
- Converting a dynamic piece of code using WordPress Loop into a static one using Post ID
- Display post from current category and same tag?
- How to display WordPress archive into three columns [closed]
- Applying $posts_clauses filter to specific queries only
- How to include a post type in the admin/backend?
- Can I use images as anchor tags with
- How to get post bulk edit action trigger and get edited post ids?
- Paginated Posts – Social Media Buttons Share First Page URL
- edit_form_after_editor only in post edit pages
- IP camera jpg stream to post
- Is there a straight-forward way to iterate over all shortcodes in a post?
- Using custom post template
- Adding custom fields to bbpress reply form
- Display post option on frontend
- Create new posts in bulk using existing post
- Problem with adding programmatically woocommerce product post into category
- Post id algorithm in WordPress
- Show the content that is after the excerpt using child theme
- How to put link in twenty fourteen theme? [closed]
- Skip in WordPress Post ID’s, can this cause issues?
- Change target of view link in admin
- Switch to page template when using post permalink
- how to add older post to new wordpress post with new post?
- How not display particular post?