There’s an in_footer
parameter that you can pass to wp_enqueue_scripts – does that work?
I would hook to admin_enqueue_scripts
, check the $page for location, and enqueue your script there, with ‘in_footer’ as true.
Example:
add_action( 'admin_enqueue_scripts', 'enqueue_my_script' );
function enqueue_my_script( $page ) {
if ($page !== 'edit.php') return;
wp_enqueue_script( 'my-script', 'http://path/to/my/local/script', null, null, true );
}
Related Posts:
- Add a script as a dependency to a registered script
- Setting up an API “listening” page
- Serving wp-includes (front-end) javascript from a different domain?
- Add conversion/tracking pixel to section for specific post
- WP CLI theme install. Install a private repo?
- How do I enqueue a JavaScript in my footer via the functions.php file?
- Overwrite or Replace code in WP_Footer
- change $src from wp_register_script in plugins/themes
- Change directory of javascript files
- By having WordPress in a subfolder does it mean more script executions?
- Script Code in Text Widget Does NOT Show
- Invision + WordPress integration
- wp_print_scripts runs twice
- How to serve wp-includes javascripts from CDN? [duplicate]
- Register scripts located in child theme?
- How to add GET variable after script url?
- On click load iframe [closed]
- WordPress 5.1 upgrade has lost the parent theme JavaScript
- Generating a static page from a script
- Refused to execute as script because “X-Content-Type: nosniff” was given and its Content-Type is not a script MIME type
- Disable load scripts and styles not working
- Socialite not displaying icons [closed]
- Script dependencies generates different outputs
- Renaming the ‘build’ directory generated by @wordpress/scripts for React development
- How do I make it so that wp-scripts builds on plugin activation
- CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page
- Fix footer to bottom of page
- force footer on bottom on pages with little content
- How to make a sticky footer in react?
- How can I make my footer center to the bottom of the page?
- Flushing footer to bottom of the page, twitter bootstrap
- What does wp-embed.min.js do in WordPress 4.4?
- What is your best practice to execute one-time scripts?
- How do I get the $handle for all enqueued scripts?
- How to load css in the footer [duplicate]
- How can I get a list of all enqueued scripts and styles?
- How to properly dequeue scripts and styles in child theme?
- Conditionally enqueue a widget’s script/stylesheet in HEAD (only when present on page!)
- how to remove default jquery and add js in footer?
- How To Remove WordPress Version From The Admin Footer
- What are the benefits of using wp_enqueue_script?
- How can I create a bash install script for my WordPress sites setup (WP+plugins+theme)?
- How to add javascript just before the closing body tag in the footer of WordPress
- Correct Method to run scripts with dependencies without enqueue?
- Auto get_header and get_footer on every template?
- dynamically add scripts to WP_Widget widget() method
- Load plugin scripts and styles only on plugin page
- Get list of scripts / styles and show file which enqueued them
- My add_action (wp_footer, ‘method’) is not calling?
- How to stick the footer to the bottom of the page? [closed]
- How to remove version and thank you message from the admin footer
- How to add code to just before closing body tag
- How to prevent wordpress from loading old versions of jquery in wp_head();?
- Is it possible to change the attributes of a registered style or script before it fires?
- How can I add a custom script to footer of login page?
- wp_enqueue script my_javascript_file in the footer
- How to add JS in footer
- How to get a jQuery script to run on a page?
- Outputting Canonical Resource URLs Across a Multisite Network?
- Editing Source Code in WordPress
- How to load JQuery easing script in wordpress?
- How to remove “Proudly powered by WordPress” in Twenty Sixteen (2016) theme?
- Hook for writing text string after footer scripts
- Odd Script File Trying to be Loaded
- How can I remove “Proudly powered by WordPress” from twentyeleven without modifying footer.php?
- Add script to footer – on post editor
- wp_register_script multiple identifiers?
- Listing registered scripts
- Some way to Flush or Overwrite all Imported Content in a Site for a Fresh Import – How?
- Wp_head and wp_footer vs wp_enqueue_script javascript files?
- Can i put ‘page’ at the bottom of each page?
- enqueuing React script and hooking its target div fails to load script
- Shortest possible shell script to install WordPress on Nginx server?
- Including javascript for a shortcode
- Share buttons on article footer
- Trigger a php file on every post or page if a condition is met
- How do I load custom scripts and styles for a page?
- How do I enqueue(or delay loading of) tags in individual page posts?
- Add footer.php to WordPress child theme
- Proper Javascript Implementation
- How to call a plugin function in footer.php
- footer.php – twentysixteen child theme – social links menu to output font awesome icons
- How do you completely remove the default header and footer using functions.php?
- Styles and Scripts, Selectively enqueue across entire site
- How to remove some external js files from source?
- Best way to create a user programatically
- Why Allow Script Commands in Comments?
- Sharing Header Components Across Multisite
- WordPress Script Loading/Unloading — wp_deregister_script(‘jquery’)
- How to edit footer
- Why and how is twentythirteen adding a margin-top to my footer?
- How does WordPress create its database during installation?
- Template part vs Sidebar (differences)
- Change directory where get_header(), get_footer() and get_sidebar() look for templates
- Move all the JS files to the bottom|footer, the right way
- Print string to footer using wp_footer option
- Putting footer content in a “page” – Doing it wrong?
- Is there any free (or cheap) software that can be used for testing WordPress functionality?
- Inserting JS snippet in the footer if there is no wp_footer?
- Select2 in WordPress