That’s it. 2. Collapse full source code JavaScript is a client side programming language. * * @since 1.5.1 */ do_action( 'wp_footer' ); } Expand full source code Add a Shortcode to Header or Footer in WordPress. Make sure to change the name of the function on both places: “change_this_name_of_your_function”. It is only one aspect of making the site load faster. But, when you switch themes, the new theme will not have the custom code. Multi footers When you put JavaScript at the top, browsers may execute or process the JavaScript before loading the rest of your page. Another option is to use the plugin we’ve prepared to do this task. Smart Footer System, YITH Footer Banner, Header and Footer Scripts, StickyFooterNav, Ultimate Footer Builder and a few other plugins to make the best use of the footer section. You are good to go. The original function in the mentioned file is wrapped with a conditional statement that checks if the function was previously declared.If a function with this name exists, then the original function will be replaced with yours. wp-includes/script-loader.php: print_footer_scripts() Prints the scripts that were queued for the footer or too late for the HTML head. Edit the WordPress footer code. Best footer WordPress plugins to spice up the footer section in your site. Just create a new functions.php file and a footer.php file in your child theme directory and insert the codes. The following code is a simple example of a template for an “HTTP 404: Not Found” error (which you could include in your theme as 404.php). Includes the header template for a theme or if a name is specified then a specialised header will be included. The good folks over at WPBeginner have created the Insert Headers and Footers a very simple plugin to help you add code to the site’s header or footer. If you want to influence the moment that your hook is executed, you can append an integer as 3rd argument to add_action: The higher the number, the lower the priority and as a result your hook will be executed further down the page. So, loading them in the footer area will be good idea to make the site load faster than enqueueing or adding them in the header area. It has a simple user interface with just two text areas—one for the header and one for the footer scripts. These two functions are known as “action hooks”. Install a Plugin. (void|false) Void on success, false if the template does not exist. Code Example: Using wp_footer to Add Visible HTML to the Footer of Any WordPress Theme Here’s the code we ended up showing in the video, in its full final form: add_action('wp_footer', 'wpshout_action_example'); function wpshout_action_example() { echo '