There’s not enough information to really determine what is happening, but the best course of action is to make sure your code is only added to the options page, so it can’t interfere with anything on the edit page. You can use get_current_screen for that, like this:
add_action( 'current_screen', 'wpse113256_this_screen' );
function wpse113256_this_screen() {
$current_screen = get_current_screen();
if( $current_screen ->id === "options" ) {
// Run your code
}
}
You’ll have to check if the ID of your options page is actually “options”.
Related Posts:
- How to force Media manager to overwrite files of same name?
- How can I stop WP media uploader from creating duplicates of my uploaded images?
- Get attachments by user
- wp_enqueue_script being ignored in custom theme
- Getting jquery to work with custom theme
- Including Javascript options
- Media Uploader in custom path
- Difficulty loading jQuery with wp_enqueue_script
- jQuery not available to other scripts
- wp.media issue with selected image
- how can i remove js file from my footer in wordpress
- WordPress uploads do not show up and I see the white screen of death in some cases
- enqueue script if page is not equal to
- Theme now uses require.js and enqueue script no longer works
- Convert base64 string to WordPress attachment uploads multiple images instead of a single one
- ajaxurl not defined on front end
- How to include jQuery and JavaScript files correctly?
- pass object/JSON to wp_localize_script
- How to enqueue script if widget is displayed on page?
- Import media to online WordPress from local development
- Why I can’t add a CSS style in this WordPress theme?
- The difference between calling wp_enqueue_scripts to load scripts and styles in custom theme
- jQuery in header or footer
- What can I hook into after_setup_theme?
- What does “Do not deregister the jquery script in the administration area” mean?
- WordPress Enqueue Script Chaos (jQuery & Foundation.js)
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- using wp_enqueue_script to attach jquery-ui
- WordPress Google Maps in Custom Theme
- How to regenerate thumbnails when they’re stored on S3
- Script won’t execute in the media manager
- How can one update a theme on a live site without interruption?
- How to upload images using Settings API
- Toggle Sidebar Display
- wp_enqueue_media() Will not load JS on the theme
- functions.php not hooking up with style.css
- way to include own functions independent of theme
- How to To Filter wp_enqueue_script() Scripts on Some Pages
- How to add a download link to a movie from WP media library?
- Attach media to multiple posts
- Is it possible to hide media details sidebar when wp.media popup is being opened?
- Customizer: Unique identifier that distinguishes which image upload control is uploading an image
- Can´t access child theme´s scripts dependencies found in parent
- How to enqueue javascript for WP Customize options sidebar?
- Add attachment for all images in post
- My jQuery is enqueued properly. So why isn’t it working?
- Yoast SEO breaking media upload
- Enqueued JavaScript is not working
- Using jquery-1.7.2.min.js instead of the wordpress jquery
- Can I add an icon & function to the “Upload/Insert” toolbar at the top of the content editor?
- Overide enqueue in non plugable function via child theme
- How to make javascript work on theme options page
- How to register and enqueue JavaScript files without breaking plugin dependencies?
- JQuery undefined and Stylesheet loads in bottom along with js files
- Weirdness in jQuery supplied with WordPress
- How to fix : Uncaught ArgumentCountError: Too few arguments to function? [closed]
- How to enqueue a script which is type module without using script_loader_tag filter?
- How to change the text of the “You are about to permanently delete these items…” alert message when deleting media from the media library?
- jQuery from parent theme loaded with many other scripts in a single min.js file
- Custom jquery not code not working in wordpress
- WordPress creating images if uploaded image is greater than 960px on one side?
- Callback Function Not Firing On Selection In Media Uploader
- Using the media library for theme customization
- Trouble in enquing all js files under certain directory
- add jquery file if a certain page is included
- HTTP Error when uploading images over specific dimensions
- loading javascript after jquery is loaded
- MapPress Easy Google Map in Jquery Tabs Problem
- I don’t think WordPress is loading jquery or bootstrap js
- Adding google fonts to WordPress theme
- “The REST API did not process the context query parameter correctly.” Custom theme conflicting with Media Library
- wordpress file upload from direct directory not working
- Bootstrap slider not working
- Embedding CodePen Calorie Script – jquery error
- How to load jQuery with Ajax in WP version 5.3.2?
- How to enqueue scripts properly with ES6 webpack?
- Infinite scroll without plugin using ajax
- change background image on scroll
- Enqueue script for development purposes only?
- Correct was to customise theme using get_theme_mod in scripts
- How to destroy or dispose wordpress uploder/manager?
- Can’t upload images on new theme
- how can I re-utilize and class on a child theme
- How to install jquery dotdotdot plugin for WordPress?
- jQuery conflict in WordPress, works fine in HTML
- How would I get this to work – send to post from thick box
- How do I get my theme scripts to load in a custom theme built from Bootstrap
- FitVid not working for iframes on particular theme install
- Enable WP to accept standard jQuery code embeding between the tags [duplicate]
- WordPress custom jquery not found
- Passing a location-dependent array via wp_localize_script within a shortcode
- Set start page depending on screen width [closed]
- WordPress Subpages Fancybox Trouble
- Edit Image/Image Details – Replace button missing
- Enqueue script/style with multiple GET parameters
- can’t add EVENT LISTENER to a element
- WP Customizer get control value on change
- Execute javscript when theme customizer loads (autosave issue)
- Is there any halfway decent documentation on the wp.media JS class?
- WordPress Includes mejs 404 error