I've got wordpress installed on a site but I want to call the wordpress header from my installation (header.php) into a non wordpress php page as I want to make a landing page and I want it to look the same like the actual wordpress site. So, the easiest way would be to just call this into the page. Is it possible? I've added <?php get_header(); ?> PHP: at the top of this new page but I get this error when I access the page. All the files are in the same directory. Fatal error: Call to undefined function get_header() in /home/username/public_html/sitename/wp-content/themes/gossip/contest.php on line 4 Now, I don't know PHP, could someone translate that to me and advise me if what I want to do is even possible, and give me some guidelines? . Thank you!
You'll have to include the file that the 'get_header()' function is defined in, in order for that to work. I'm pretty new to wordpress myself so I don't know off the top of my head where it's located...give me a couple min and I'll find it.
It's in the general-template.php file inside of 'wp-includes' which should be in the directory you installed WP in... You would also need to have the app info file (not sure what it's called in WP) with the template path available...
Hmm, thanks for the reply! I've sorted it out somehow, not quite how I wanted to though but I'll keep working on it. Cheers!
You would have to include a long list of files to make it work just like a WP page. Wouldn't it be easier to create the landing page in wordpress and customize the appearance for that page ( stuff like dropping the sidebar etc).
Well I just want the header and the background to be like the WP page, nothing else. But I'm using an iframe and a script that for some reason don't work with wordpress even when I hard code it into the files so I have to use a separate page.
You should be able to do it all within the WP system. Look at http://www.expressandstar.com/ which uses WP as a portal. This site is tricked out to the max.