Newbie needing help making wordpress look like rest of site…
-
Hi,
On my personal site I use PHP to give all my pages the same header and footer (and a sidebar for navigation). The code looks something like this:
<?php
$title=’TITLE_HERE’;// HTML Title
$bc_title=$title; // Title for breadcrumb
$root=$HTTP_SERVER_VARS[‘DOCUMENT_ROOT’];require(“$root/header.inc”);
?>
<!– Start HTML code now… –>
some stuff here…
<!– No more code –><?php require(“$root/footer.inc”); ?>
Having just installed wordpress and migrated my blogger blog over to it I would like the wordpress index to follow the same format. I could just do this to the wordpress index.php file:
<?php
$title=’Deryck\’s Diary’;// HTML Title
$bc_title=$title; // Title for breadcrumb
$root=$HTTP_SERVER_VARS[‘DOCUMENT_ROOT’];require(“$root/header.inc”);
?>
<?php
/* Short and sweet */
define(‘WP_USE_THEMES’, true);
require(‘./wp-blog-header.php’);
?>
<?php require(“$root/footer.inc”); ?>Which does actually work (apart from a few CSS problems which I could fix) but it clearly isnt the best approach. If nothing else this solution gives me a resulting page with 2 doctypes, 2 titles, 2 head sections, etc…..i.e. it’s not valid HTML and I would like to keep my site using 100% valid HTML and CSS.
Is there a standard way to incorporate my own header and footer without completely writing a new template?
I’m sure that people have encountered this issue before and there must be a resource or even tutorial on the web somewhere that could help me?
Any help/advice would be much appreciated.
Cheers
Deryck
- The topic ‘Newbie needing help making wordpress look like rest of site…’ is closed to new replies.