• Resolved ohhorror

    (@ohhorror)


    I apologise if this has been asked before. I’ve looked and I couldn’t find a topic that answered my question.

    Basically, I have a few pages that I’d like to work with my wordpress template without having to use wordpress pages.

    I thought it’d be as simple as including the header, sidebar and footer files, but apparently not.

    If anyone could help, it’d be appreciated !

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    We need more information. What kind of “pages” are you talking about? HTML? What do you mean by “without having to use wordpress pages”?

    Try to be as specific as possible. Examples are good.

    Generally, the easiest way is to simply create a new “Page” in wordpress and paste your text into it. If you want to be more complex about it, you can integrate your pages into your theme, but how you do that depends on what these non-wordpress “pages” are in the first place.

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

    With correct path for your environment, of course.

    Thread Starter ohhorror

    (@ohhorror)

    well, they’re .php pages.
    some have php in them and some don’t.

    & by not having to use wordpress pages i mean, without having to create a new page in wordpress.

    & yosemite i tried that code, but it didn’t work. =/

    Thread Starter ohhorror

    (@ohhorror)

    actually, that code does kind of work.
    i get the sidebar and the footer, but no header.

    it looks like this: https://www.ohhorror.net/girl.php

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Well, how you do it depends on how integrated you want these pages to be with WordPress.

    Yosemite’s method will work, it’s a matter of getting the the path to the wp-blog-header.php file correct. That code essentially includes the entirity of wordpress, thus letting the get_header() and get_sidebar() and get_footer() functions all work.

    But if you want them a bit more integrated into WordPress itself, you can just make a new page template with that code in them, then create a new wordpress “Page” using that template.

    Thread Starter ohhorror

    (@ohhorror)

    Well I basically just want the page to be intergrated with the theme.
    The code Yosemite posted appears todo the trick, but I don’t get the header.

    Thread Starter ohhorror

    (@ohhorror)

    Sorted !

    Thanks for your help. =]

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Intergrating non-wordpress pages into wordpress.’ is closed to new replies.