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?
- Count how many posts in category
- Custom Single Post By Category
- Post slugs and images cannot have same name?
- Hide password protected posts in admin
- Adding Post Counts to Menu (Nav) Programmatically?
- This AJAX Code Doesn’t Work – Looking for elegant solution
- Show chart in post using data passed as custom field
- Show One Category on Post
- Show post titles only on the homepage
- Creating new page with pre-defined parent page
- Get all Youtube video’s from posts and embed them on a different page
- Send email to user that his post has been rejected
- How can I highlight syntax like it appears on stackoverflow?
- wp_insert_post let users post to without login…broke
- Export posts manually selected by end user (not logged in)
- Add Category name to Post Title (h1)
- Blogroll – Different layout for first post
- How to delete old posts’ edits to save space?
- When trashing a post, also trash related comments
- Image Insert into posts and pages not working after 3.2.1 update
- How to add Tags Filter in wordpress admin dashboard
- allow new users to post an article before they sign up [closed]
- Make Post Editor Select Number of Columns To 1 By Default
- Adding the_date inside tags around the_content
- Mixing Tweets with Posts
- Problem with permalink routing?
- Making a custom Pagination for multi page blog post
- WordPress is replacing double minus signs in Post Title, how to disable it?
- using is_paged for hiding image on posts
- Show custom post with custom categories with specific slug
- Do one have to wait after pressing “update” on a post edit page?
- separate the post of a category by subcategory
- Add Input Field in Simple Model Contact Form (smcf) plugin [closed]
- Am getting duplicate data from get_posts()
- How to display the post categories for each post inside the loop with custom format?
- Allow / show post comments in category pages
- Filter post by users creation date
- Function is printing twice – any suggestions?
- Pagination Not Working With Custom Post Type Category
- Recent Post Issue
- how to create a category with wp_insert_post and post_category
- Extracting the permalink from a post instance
- How to add a block to a category page?
- If user has 1 post then dont let him create new one [closed]
- Show all posts from the tags without having to set all of them
- wordpress display posts by terms id or name
- Maximum number of posts per page before affecting performance?
- Auto populate custom fields by post date
- Custom Taxonomy From Database
- Query post by meta key of another table
- Sort Posts Alphabetically by Multiple Categories [duplicate]
- Trying to display stick or featured post on homepage
- Single post page from static home not working
- How can I allow users (subscribers) to download selected posts into a single PDF? (RESOLVED)
- How to change text (date) in post base on the day
- Limit amount of pages shown in pagination within wp_query
- Listing category and its posts one by one
- Print out one of 2 post category [closed]
- How to get if category has posts?
- Read more opens attachment
- How to show video from post on the all posts page?
- Show a page counter for pagination