WordPress.org

Ready to get started?Download WordPress

Forums

Putting my header at top of non-wordpress page (14 posts)

  1. providencebooks
    Member
    Posted 7 years ago #

    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

  2. GOBLUE14
    Member
    Posted 7 years ago #

    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.

  3. providencebooks
    Member
    Posted 7 years ago #

    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.

  4. GOBLUE14
    Member
    Posted 7 years ago #

    Which theme are you using?

  5. Doodlebee
    Member
    Posted 7 years ago #

    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.

  6. providencebooks
    Member
    Posted 7 years ago #

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

  7. providencebooks
    Member
    Posted 7 years ago #

    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?

  8. providencebooks
    Member
    Posted 7 years ago #

    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?

  9. providencebooks
    Member
    Posted 7 years ago #

    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

  10. GOBLUE14
    Member
    Posted 7 years ago #

    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.)

  11. providencebooks
    Member
    Posted 7 years ago #

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

  12. GOBLUE14
    Member
    Posted 7 years ago #

    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!

  13. GOBLUE14
    Member
    Posted 7 years ago #

    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

  14. providencebooks
    Member
    Posted 7 years ago #

    Exactly what page do you see the 2 header codes?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags