WordPress.org

Ready to get started?Download WordPress

Forums

beta / feature request (9 posts)

  1. geekpunk
    Member
    Posted 9 years ago #

    I started fooling around w/ the beta and have a feature request / sort of bug

    in the previous version of wordpress it was very easy to alter the index.php file to integrate the application into an existing site structure / application. For instance a site built using fusebox or the such. Yet with the new integration of templates this is alot more difficult... how would some one suggest this integration / or could there be an option to run it as an external blog, where the template and the wp-blog-header, would undertsand to do or nnot do certain things. For example the "exit" lines at the bottom of wp-blog-header.php?

  2. geekpunk
    Member
    Posted 9 years ago #

    as a side I was able to get wordpress integrated into another app, by hard codding some paths, and editing the for mentioned exit commands

  3. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    Add the following line before requiring the blog header.

    $wp_template_redirect = false;

    This will turn off the theme system.

  4. Matt Mullenweg
    Troublemaker
    Posted 9 years ago #

    I think the problem really is we're using $pagenow == index.php to kick things off, and pagenow really wasn't meant for generic non-wp files, as it doesn't discriminate based on directories. Perhaps we should bump get_home_path() up and check if the index is in ABSPATH or get_home_path before doing template magic.

  5. geekpunk
    Member
    Posted 9 years ago #

    If I use

    $wp_template_redirect = false;

    can I still use an index page which I created in 1.2.2 ?

    This would essentially bypass the use of the use of the themes, but are their any other gotchas?

  6. carthik
    Member
    Posted 9 years ago #

    geekpunk, it should work the way you describe it - go ahead, and give it a try. Back up your index.php, stylesheets anyways.

  7. geekpunk
    Member
    Posted 9 years ago #

    yup, with some tweaking that worked, I needed to create a wp-comments.php in the wordpress root. I also needed to put this line in ..

    if (isset($p) && $p > 0 ) include(ABSPATH . 'wp-comments.php');

    where it was once just

    include(ABSPATH . 'wp-comments.php')

  8. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    If you use a wp-comments.php from 1.2.2 you shouldn't need to do that.

    Also, you can is_single() instead of checking $p.

  9. geekpunk
    Member
    Posted 9 years ago #

    great thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.