Previous Thread
Next Thread
Print Thread
Hop To
#241559 02/07/2011 5:29 PM
Joined: Jun 2004
Posts: 207
C
enthusiast
enthusiast
C Offline
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 Code

<?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
C
enthusiast
enthusiast
C Offline
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
R
Former Developer
Former Developer
R Offline
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
SD Offline
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 smile

Joined: Jun 2004
Posts: 207
C
enthusiast
enthusiast
C Offline
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
SD Offline
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
C
enthusiast
enthusiast
C Offline
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
SD Offline
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 smile


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
1 members (Ruben), 476 guests, and 111 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)