• I’m trying to create a template within a theme that includes index.php.

    I’m simplifying the boring stuff for conciseness, but basically it works like this:

    <?php
    if ($some_condition = 'true') {
       print "A warning message";
       exit;
    }
    
    include('index.php');
    ?>

    When I do this, the page turns out blank. If I create a bogus.php file that prints a single line, and include that instead, the line prints. If I try including a file that’s not there, it throws an error (so at least I know I’ve got my paths right.)

    How can I include other template files from within the current template? Thanks.

  • The topic ‘Including a theme’s template inside another template?’ is closed to new replies.