|
|
Joined: Jun 2004
Posts: 207
enthusiast
|
enthusiast
Joined: Jun 2004
Posts: 207 |
Hi, I'm trying to put my wordpress header and footer in using the include files. For some reason I cannot get this to work despite being able to in other php pages.
<?php
require('../wp-blog-header.php');
include $_SERVER['DOCUMENT_ROOT']."/wp-content/themes/platform/header.php";
?>
It 404s to this forum/wp-admin/install.php and I can't figure out why. TIA for any help.
Won't you take me to Funkytown?
|
|
|
|
Joined: Jun 2004
Posts: 207
enthusiast
|
enthusiast
Joined: Jun 2004
Posts: 207 |
Well it's become pretty clear that my approach here was really wrong. I need have to figure out a way to integrate the wordpress data into the header.tpl file. Obviously getting the CSS to play nice is a challenge too.
Won't you take me to Funkytown?
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Yeah, modifying the header.tpl file is the best way to go about it. And there are definitely can be issues with the css files intermingling. What normally works best is to just make a custom css for your wordpress header/footer that only includes the classes that you need to cut down on conflicts.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
that's what i do it's perty simple, with viewing the Wordpress generated source and usually grabbing the header stuff that way
|
|
|
|
Joined: Jun 2004
Posts: 207
enthusiast
|
enthusiast
Joined: Jun 2004
Posts: 207 |
So when you guys are doing this are you copying and pasting the html generated, or are you actually calling the header/footer in php and integrating it that way?
I really want to find a way to do the later because I don't want to have to manually update the menus all the time. However, I realize I'm probably going to have to write my own custom header/footer functions due to the fact that they include the head and body tags.
Won't you take me to Funkytown?
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
i do a combo bombo of copy / paste and coding the copy / paste part is just to get the header structure in place ( divs etc ) as well as to include the css and js ( jQuery for menus ) then the code part is to create the secondary menu to replace the 'hop to' menus ( http://sirdude.com/forum/ ) <-- a default forum with no real content right now ps: same idea for the footer too
|
|
|
|
Joined: Jun 2004
Posts: 207
enthusiast
|
enthusiast
Joined: Jun 2004
Posts: 207 |
Yeah you did a nice job. I just want to avoid having to manually updating my menus, especially when I'm running WP, UBB, PhotoPost, it's just a lot to maintain.
Won't you take me to Funkytown?
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
easiest would then be to just hook into the WP menu generator my site has a primary / secondary menu system and i can maintain them in WP then generating the menus in UBB from maybe a primary menu ( shared by all ) then a tertiary menu ( you can have as many menus as you want in wordpress. they don't have to be actually 'used' ) that ubbthreads and others grab it's all possible
|
|
|
1 members (mavorg),
174
guests, and
149
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|
|