WordPress.org

Support

Support » Themes and Templates » Putting my header at top of non-wordpress page

Putting my header at top of non-wordpress page

  • providencebooks
    Member

    @providencebooks

    Hi,
    I have installed a database to showcase my cars for sale and haven’t been able to get it “inside” wordpress. So I put it into it’s own directory, http://www.maconcardeals.com/cars_for_sale .
    What I would like to do now is have the top header area be the same as my main site (wordpress site) http://www.maconcardeals.com . Can someone tell me how to do this?

    Oh! I almost forgot. I will not need the “search” form when the visitor is on my database. My “search” form is in my header, is the reason I mention this.

    Many Thanks in advance,
    Scott

Viewing 13 replies - 1 through 13 (of 13 total)
  • You *should* be able to find the code for the header in your Theme Editor (under the Presentation menu in the WP Admin panel, the files that make up your site’s theme are listed to the right) and copy the bulk of that to your non-WP page. You may have to change some paths for images and such, as well as tweaking out a few things that WP uses, but that’s where you’d find it.

    I’m usually doing it the other way around (dropping info from a non WordPress page into the WP theme), but it should work fine for you.

    providencebooks
    Member

    @providencebooks

    I tried doing that to no avail. Could it be the theme I am using, not allowing this to work? I probably need some step by step instructions.

    Which theme are you using?

    Doodlebee
    Member

    @doodlebee

    At the top of your index.php file, before anything else, add this:

    <?php require('../wp-blog-header.php'); ?>

    Be sure that relative path is correct. That *might* be, because it looks like the wp-blog-header.php file is in your root directory, but your “cars-for-sale” directory is one level down.

    Anyway, once you do that, then you can use the <?php get_header(); ?> calls on the regular file, just like you can within WordPress.

    providencebooks
    Member

    @providencebooks

    I am using the Silver Lexus Theme located at http://www.highlandsbydesign.com/theme/silver-lexus-theme/

    providencebooks
    Member

    @providencebooks

    Doodlebee,
    do I put <?php require('../wp-blog-header.php'); ?> in the index file for my wordpress site or the database? And the last code where?

    providencebooks
    Member

    @providencebooks

    Okay!!! Wow!!! I think I did it. Can someone look at my page now and look for the vehicles for sale. Go to http//:www.maconcardeals.com . Let me know if it’s easy to navigate. Please. Thanks in advance!!

    P.S. Anyone know how I can put something in the sidebar in my autodata base?

    providencebooks
    Member

    @providencebooks

    I’m sorry I meant http://www.maconcardeals.com
    Can someone tell me how to maybe get something in a “sidebar”, just the left side, of my database pages

    I’m not sure how your WordPress lays it out, but if it’s like others, in your Theme Editor, you’ll have files likely named “container-left.php” and “container-right.php” that has the information from your two sidebars. (They may also be named “sidebar-(right/left).php” or something to that effect.)

    I’d also suggest running both pages through a validator, too. There are some messy errors in there. (Including a second set of header information at the top of your “centerbox” div, and something with the “expander” div that’s making your page over 1400px wide.)

    providencebooks
    Member

    @providencebooks

    Okay, that went over my head. Are there instructions for this somewhere?

    Oops. Sorry! 🙂
    Is the page you’re looking to add sidebar information to handled through your WordPress admin panel? (It looks like it is to me, which is where I drew the assumption.)

    If so, login to your WordPress account, click on “Presentation”, then “Theme Editor”. Down the right side of the editor window is a list of files that make up your page. If you have one that alludes to “container-XXXX” or “sidebar-XXXX”, (with “XXXX” being “right/left”), then that’s the file you want to open to add content in the sidebar.

    As for the validator, head to http://validator.w3.org and insert your site’s URL. That part usually leads to some digging and frustration, but in the end, it’s worth it!

    The WP codex also has pretty good instructions for how to make things work:

    http://codex.wordpress.org/WordPress_Lessons
    http://codex.wordpress.org/Customizing_Your_Sidebar

    providencebooks
    Member

    @providencebooks

    Exactly what page do you see the 2 header codes?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Putting my header at top of non-wordpress page’ is closed to new replies.