The Problem
My website has some JavaScript and PHP that I include on each page to allow login and cookie processing for persistent login, using a header that changes if the user is logged in, and these work successfully. I would like to add a pages that contain WordPress blogs/forums, while keeping my header and all its processing at the top. Is there any way to do this? My understanding is that WordPress controls the entire page with its own <head> and <body> tags and info. The backup plan is to have the blog/forum pages be somewhat rogue pages with a separate header that links back to the main site.
What I've Tried
- Figure out where WordPress sends the HTML and modify that page: They use a network of
include()statements to decide what to show, and I'd be concerned that a change in the WordPress admin panel would overwrite changes I make, or that the WordPress control panel code makes changes by adding code before/after a certain line, and I'd somehow break that. - Put the blog pages in an iframe: Prevents blog permalinks and seems to undercut the SEO benefit of a blog. Even if I could get around this with some kind of .htaccess hackery, I'm concerned having the page in an iframe could cause browsers to block some WordPress functions for security reasons.
Code I Want To Include
- session_start(), cookie handling and database connect in PHP at the top
- A header just after
<body>that I include using<?php include('header.php')?> - headerProcessing.js script that I include in the head tag (along with jquery)
- CSS file for header styling
I'm stumped and can't seem to find anything with Google - any help appreciated. Thanks!