Support » Fixing WordPress » How to add your own pages??

  • What kind of code do I have to add so my pages that I’ve made myself (not via wp’s admin panel) show up? I’ve been using header.php & footer.php with my sites.. but now since upgrading to 1.5. none of my sites are showing correctly?

    I mean I have page called bio.php and it goes something like this:

    { ?>
    here is the content….
    <? }
    include(‘footer.php’); ?>

    but now I’m getting all weird errors.. please help!?!

Viewing 15 replies - 1 through 15 (of 24 total)
  • please, anybody? I’m really in trouble now :/

    I know exactly what you mean Belewien – I can’t figure out how to do it either! Alphaoide, I think doesn’t want to use those sort of pages. (Not via wp’s admin panel)..

    I want to do the same thing and I’ve tried using
    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    for the first two lines and then adding my content and finishing with get footer.. and all it shows is:

    Fatal error: Call to undefined function: get_header() in /home/rbox/public_html/paddy/wp-content/themes/benevolence/about.php on line 1

    I think I have the same problem as Belewien even though I tried doing the header differently.

    I believe adding a

    at the very top of a page helps (it brings all the WP functions to your disposal)
    If the path is like that (./wp-blog-header.php) the files should be in your blog’s root folder

    Somebody yell at me if I’m completely off the track 😀

    You need to make sure the code in wp-blog-header.php gets executed before at the very beginning of your page:

    <?php require('_path_to_/wp-blogheader.php'); ?>
    where _path_to_ is the path to that file.

    Why you want to do this when you can define custom Page Templates? Just curious.

    Hmmm, I tried the one you gave me, and also <?php require(‘/paddy/wp-content/themes/benevolence/header.php’); ?> (my file is for some reason not wp-blogheader.php but header.php

    I want to do this instead of page templates because I dont want all that File Under, posted @ and RSS feed stuff… and I want to put HTML tables and stuff on the pages. Can you do that?

    It really should be wp-blog-header.php. It’s in the main directory of your WordPress install. (Perhaps /paddy/wp-blog-header.php)

    But yes, you can do anything you like in a custom Page Template. Include as few or as many WordPress functions as you want, as much or as little PHP as you want and whatever HTML strikes your fancy. See the examples on that link I gave you; the first is an example of a “dummy page”, which may be what you’re after.

    OK! Great – thanks mdawaffe!

    But what if I’ve done my own header AND footer.. Do I have to include the stuff from my header to wp-blog-header.php or the other way around? And I’m also using footer.php how can I make that work? :/ I’ve got over 20 extra pages and I really wouldn’t want them to go to waste… >_<

    require wp-blog-header.php from your header file
    then include that header file in each of your pages:

    <?php require('_path_to_/wp-blogheader.php'); ?>

    <?php include('myheader.php'); ?>
    <?php include('myfooter.php'); ?>

    But I still think WordPress Pages and custom Page Templates will be a better solution in the long run for most of your extra pages.

    I’m confused with adding my own pages…
    Template Name: Photos
    Do I add that in my “Write Page” thing? I don’t understand how it works…

    Oh that page I basically want it to be blank to begin with.. so then I can add whatever I want..

    No – put it at the very top of a new file. Call it photo-template.php, for example. Then put in whatever PHP and HTML code you want after that.

    Create a Page and select from the Page Template dropdown “Photos”.

    Nope.. still doesn’t work.. look this for example:
    I only really want the blog thingie on my site with my other pages.. not the other fancy stuff. Maybe it’s better to get that earlier version back… :/

    It looks like the paths to your header and footer files are wrong.

    Broken Record: I truly believe that in the long run, Custom Page Templates (as referenced above) will be easier. The method you are using will work, though.

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘How to add your own pages??’ is closed to new replies.