Creating a Header Include

Issue/Question

How do I add code the HTML <head> of every page on my site?

Environment

  • Modern Campus CMS

Cause

Services like marketing tools may provide code that needs to be placed in the HTML <head>.

Resolution

When a file named _header.inc is added to the root of your site and published, its content will be inserted between the <head> tags of all your site's pages.

  1. Create a plain text file on your computer, for example new_file.txt.
    Note: Depending on your operating system's settings, the .txt extension may be hidden when displaying the filename of this file.
  2. Log into Modern Campus CMS and navigate to the root folder for your site.
  3. Then, click the Upload button above the folder content list.
  4. Using the Upload to dialog box, select the plain text file you created earlier, either by dragging it to the appropriate place or by using the green + Add button.
  5. Hover over the added file and select Rename from the Status / Options column, and rename it to _header.inc.
  6. Click Start Upload.