Note that there are some explanatory texts on larger screens.

plurals
  1. POAdd WordPress blog to site while keeping my existing header and scripts
    primarykey
    data
    text
    <h2>The Problem</h2> <p>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 <code>&lt;head&gt;</code> and <code>&lt;body&gt;</code> 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.</p> <h2>What I've Tried</h2> <ol> <li><strong>Figure out where WordPress sends the HTML and modify that page:</strong> They use a network of <code>include()</code> 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.</li> <li><strong>Put the blog pages in an iframe:</strong> 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.</li> </ol> <h2>Code I Want To Include</h2> <ol> <li>session_start(), cookie handling and database connect in PHP at the top</li> <li>A header just after <code>&lt;body&gt;</code> that I include using <code>&lt;?php include('header.php')?&gt;</code></li> <li>headerProcessing.js script that I include in the head tag (along with jquery)</li> <li>CSS file for header styling</li> </ol> <p>I'm stumped and can't seem to find anything with Google - any help appreciated. Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload