9. Insert HTML Module in Beyond Multisite

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?

  1. Navigate to the Beyond Multisite page in the Network Admin Screen.
  2. If the circle in the Insert HTML box is gray, click the Turn on button in the Insert HTML box.
  3. Click the Show Settings button in the Insert HTML box.
  4. 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.
  5. From the drop-down menu called Affect sites with, choose an option:
    1. Any site ID – The HTML code will be displayed on all sites.
    2. 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.
    3. 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.
  6. 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.
  7. Under Affect page types put a checkbox on the parts of the site(s) that you want to be affected:
    1. 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.
    2. 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.
    3. 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.
  8. Click Update Settings.
Get Beyond Multisite - Premium WordPress Plugin