Support » Alpha/Beta/RC » Using WP framework outside WP dir

  • I have a WP2 SVN test install going, which looks nice – theme, plugins and all (and it integrates fine with Gallery 2 and the WPG2 plugin, btw). It’s installed in

    I’ve created an index.php in where I want to initialize WP in order to create a sort of portal page to my site, tweaking my theme header, and doing some nifty stuff with the core WP functions and my own PHP l33t skillz. Or something like that anyway.

    So I’ve basically just grabbed the contents of blog/index.php and blog/wp-blog-header.php, hard-coded a few pathnames and had WP running from that dir right away – was that a mind-blowing experience or what!? 🙂 Well, it was unexpected in any case.

    But how can I circumvent all the theme stuff, and pick the header, blog entries and sidebar stuff apart and put it all together the way I want it in the easiest manner? I mean, I can backtrace all the function calls and get to loading the least of the UI and core possible without breakage by trial/error – but does anyone have any tips for me on where to start and/or how to get into this with WP2.0?


    BTW: I know of Denis de Bernardy Static Front Page plugin for WP 1.5 and have tried it (with WP1 1.5) and didn’t like it. I’m a control freak.

Viewing 4 replies - 1 through 4 (of 4 total)
  • No tips on this one? Is it even feasible?

    In short, I just want to show most of my theme, a few post headers, do some custom PHP things, display some stats and so on. I don’t mind initializing the WP core to do this, as long as I can call regular template tags and pick things out that way.

    Anyone have a take on this? Easy/difficult?


    Moderator James Huff


    There are plenty of tips located on the forums for doing something like this with WP v1.5.x, but since you are using a pre-release version of WP v2.0, which was made for testing purposes only, I doubt that you will find any help with this.

    I don’t exactly understand what you want to do, but I think you are underestimating how flexible the template system is…

    I would try making a custom template just for your homepage. You then can choose to use standard headers or different headers, and have access to all the wp template functions.

    I actually made a dummy page for one site, which only has a title and has a custom template. The template ignored the page content, and runs the <a href=”
    “>wordpress loop to pull in the posts I want.

    The only downside I can see is that if your wordpress install is when you set the wordpress blog location option to you make it difficult to have wordpress generate stuff at And if you depend upon wordpress generating links between parts of your blog, you will have confused it.

    FYI, I did all this on WP 1.5.2 instead of WP 2.0RC2, but I don’t expect any of this clever stuff to be broken.

    Thanks for your replies, I had sort of come to those conclusions myself. But it’s nice to have them confirmed.

    FWIW, I have decided on the method with the custom template and am redirecting from / to /blog/portalpage which is a bit ugly, but gets the job done. I can then mess with the template and not worry about whether the WP framework is initialized properly.

    On a sidenote: once upon a time (I believe pre-1.5) it was possible to set your page slug to anything you liked. Now I can’t even set it to / or some random address. That kind of sucks, since I (also) use the links of pages for navigation, and that would allow me to link to stuff outside of WP. The actual page content would never be viewed of course, only the page slug would be important. Huh.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using WP framework outside WP dir’ is closed to new replies.