Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can include custom PHP code in your pages in a couple ways…

Including code at the page configuration level

Step 1: Create your code block

  1. In this case, I recommend using a plain text block for your code. In the Add Content menu, select Block > Basic > Text Block.

    add text block menu itemImage Added
  2. Add you code as the text block content.

Info

Be sure to wrap your code in the correct code section tags!

→ More: Code Sections on the Hannon Hill Knowledge Base

Step 2: Add your code to the page configuration

  1. Edit the desired page.

  2. Select the Configure tab.

    configure tabImage Added
  3. Select the php output.

    php outputImage Added
  4. In the CODE region, use the asset selector to select your code block.

    choose block for the code regionImage Added
Info

You can leave the format selector empty

Including code within the page content