I have a page on my site that is not a page in WordPress. How can I add it to the header?
EDIT: The page is .php. It is outside of the theme structure.
|
|
The code you want is:
Place the file in the same directory as header.php. EDIT: depending on the nature of the content, and how often you will reuse, you may also choose to use this: http://codex.wordpress.org/Function_Reference/get_template_part |
||||
|
|
|
You can simply add a template header comment and add your site as Page Template. Just add the following line on top of your file:
Then add another page and choose your new template from the dropdown/select on the meta box on the right. You don't have to add any content or anything (I'd add a title in case it gets used) and your site will be integrated straight into WordPress. You then can even add it to menus, etc. |
|||
|
|