How can I selectively print scripts to the footer of certain admin pages?

I’m using admin_footer-{$hook_suffix} to selectively print scripts on the new post page and comments page. This hook is depreciated in 3.1. I see there’s an admin_print_scripts-{$hook_suffix} but this does not print to the footer, rather to the header before any jQuery or other stuff is loaded. How can I selectively print scripts to the footer … Read more

How can I customize wp_footer, where is the code that controls what this function does?

I am using WordPress 2013 theme as a starting point for a new theme from scratch. Under my themes folder, my footer.php theme looks like this. (Notice the final functionwp_footer(). </div><!– #main –> <footer id=”colophon” class=”site-footer” role=”contentinfo”> <?php get_sidebar( ‘main’ ); ?> <div class=”site-info”> <?php do_action( ‘twentythirteen_credits’ ); ?> <a href=”https://wordpress.stackexchange.com/questions/121589/<?php echo esc_url( __(“http://wordpress.org/’, ‘twentythirteen’ … Read more

Add external js file to footer with id

I know how to add custom/external js but i dont know how to pass js id also. i am using it as: wp_register_script( ‘validation’, ‘https://www.asd.in/script.php?id=3ff00a469474bbe71a9218a7f0377518’, array( ‘jquery’ ) ); wp_enqueue_script( ‘validation’ ); but I need output in footer like: <script type=”text/javascript” id=”3ff00a469474bbe71a9218a7f0377518″ src=”https://www.asd.in/script.php?id=3ff00a469474bbe71a9218a7f0377518″></script> Note: ID 3ff00a469474bbe71a9218a7f0377518 most show in output 1 Answer 1 You can … Read more

How can a Theme Contain no Header File or Footer File?

Some themes that I have seen such as the (famous) thesis or even a few other not so famous themes have just an index.php (which has nothing in it), functions.php (call’s their framework) and a style.css – and of course the comments.php. These themes don’t exactly show you where they are storing their CSS – … Read more

Inserting JS snippet in the footer if there is no wp_footer?

I wrote a plugin which uses wp_enqueue_script() which will include the snippet in either the header or footer depending on the parameters you pass it. The in_footer parameter works great – if the theme utilizes the wp_footer() hook. What are my options if I want to include the JS snippet directly before the </body>tag if … Read more