The MU forums have moved to WordPress.org

Adding a .php file (5 posts)

  1. gsxtasy
    Member
    Posted 15 years ago #

    What I am trying to do is create an external page "sitemap.php" that lists all the pages.

    <?php get_header(); ?>

    <div id="content">

    <div id="contentleft">

    <div class="breadcrumb">
    <?php if (class_exists('breadcrumb_navigation_xt')) {
    echo 'Browse > ';
    // New breadcrumb object
    $mybreadcrumb = new breadcrumb_navigation_xt;
    // Options for breadcrumb_navigation_xt
    $mybreadcrumb->opt['title_blog'] = 'Home';
    $mybreadcrumb->opt['separator'] = ' / ';
    $mybreadcrumb->opt['singleblogpost_category_display'] = true;
    // Display the breadcrumb
    $mybreadcrumb->display();
    } ?>
    </div>

    <h1>FunCityFinder SiteMap</h1>

      <?php wp_list_pages('title_li='); ?>

    </div>

    <?php include(TEMPLATEPATH."/sidebar.php");?>

    </div>

    <!-- The main column ends -->

    <?php get_footer(); ?>

    I named this file sitemap.php and put it in my theme directory. But when I go to sitename.com/sitemap.php its goes to a 404 page...any ideas on how to get this to work?

  2. zackf
    Member
    Posted 15 years ago #

  3. gsxtasy
    Member
    Posted 15 years ago #

    im getting a Fatal error: Call to undefined function get_header() in /home/funcity/public_html/wp-content/themes/default/sitemap.php on line 1

    Any other ideas?

  4. demonicume
    Member
    Posted 15 years ago #

    look for spelling errors and make sure 'function get_header' exists somewhere

  5. Klark0
    Member
    Posted 15 years ago #

    Make it a page template. then go to Write Page and select it.

About this Topic