How do I insert php code at the top of a template.
How do I insert php code at the top of a template before the document declaration. My code keeps getting stripped out.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Bradley Wagner on 25 May, 2010 07:45 PM
Try using a START-ROOT-CODE section.
The template parser doesn't like unrecognized tags that look like XML processing instructions:
Your template would look something like this:
and would move the php to the top when rendering the page for publishing.
Bradley Wagner closed this discussion on 25 May, 2010 07:45 PM.
John Turner re-opened this discussion on 25 May, 2010 08:09 PM
2 Posted by John Turner on 25 May, 2010 08:09 PM
that's what I was looking for :) thx!
Joel closed this discussion on 26 May, 2010 02:14 PM.