This module lets you insert custom HTML code before the closing </head> tag or before the closing </body> tag on either the front-end or back-end of all or some sites from a WordPress multisite network.
How to Insert HTML Code?
- Navigate to the Beyond Multisite page in the Network Admin Screen.
- If the circle in the Insert HTML box is gray, click the Turn on button in the Insert HTML box.
- Click the Show Settings button in the Insert HTML box.
- If you want to insert before the closing </head> tag use the first form, and if you want to insert before the closing </body> tag, use the second form. Enter the HTML code in the chosen text area.
- From the drop-down menu called Affect sites with, choose an option:
- Any site ID – The HTML code will be displayed on all sites.
- Only these site IDs: – The HTML code will be displayed only on the sites with an ID that is entered in the next text box below.
- All except these site IDs: – The HTML code will be displayed on all sites except the ones with an ID that is entered in the next text box below.
- If you have chosen something other than Any site ID in the previous option, you also need to fill the text box below the drop-down menu with a comma-separated list of site IDs.
- Under Affect page types put a checkbox on the parts of the site(s) that you want to be affected:
- Front-end pages using the theme – This includes all parts of the site that are not administration screens or login related pages created by WordPress. The active theme template is applied to those pages. The wp_head and wp_footer action hooks are used.
- Front-end login related pages – This includes the login page, the lost password page, and the reset password page. They do not use the theme template so separate hooks are used: login_head and login_footer.
- Back-end admin pages – This includes all administration screens. The hooks admin_head and admin_print_footer_scripts are used. The hook admin_print_footer_scripts does not run exactly before the closing body tag, it rather runs before the closing of the wpwrap div tag, but there is no hook that runs outside the wpwrap div tag, so we use this one.
- Click Update Settings.