Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hallo,

    some hosting services may disable file inclusion over HTTP. The right steps are:

    1. use require_once to link your WP installation
    2. use an absolute or relative filesystem path to wp-blog-header.php
    3. use the IIP’s allowStatus option if the page to include is not a published page (eg. draft or private)

    Below you can find a tested example of code:

    <?php
    session_cache_limiter('none');
    session_save_path("/Some/path/to/PHPSessions");
    session_start();
    require_once '/path/to/wordpress/wp-blog-header.php';
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    	"https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    	<title>Test for WP IIP</title>
    </head>
    <body>
    <h1>Hello World!</h1>
    <?php if (function_exists('iinclude_page')) iinclude_page('/somepage', 'allowStatus=private,publish') ?>
    <small>page ends here.</small>
    </body>
    </html>

    Hope that helps


    Vito

    Hi erick,

    you can use this code to show only page content:


    <?php iinclude_page(4); ?>


    Vito

    Hi Steve,

    IIP applies all content filters when including a page/post content. A quick workaround could be remove the filter and re-attach it before returning.

    I’m doing this on a few filters that give problems.


    Vito

Viewing 3 replies - 1 through 3 (of 3 total)