• I just upgraded to 2.5 (from 2.1) and am having trouble getting posts to appear on an outside PHP page.

    The loop code I’m using is below – it’s what I used to show WP posts in previous versions. I now get an error:

    “ERROR: Object is not a valid feed template”

    I don’t have any plugins activated nor does the loop code reference a plugin. My posts show up fine in the normal WordPress template page, but I need to be able to call them from an outside php file.

    Doese anyone know what could be causing this problem?

    ———————————

    <?php /* Don't remove this line. */ require('./wordpress/wp-blog-header.php'); ?>
    <!-- // loop start -->
                  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                </p>
                <h3 class="post" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
                  <?php the_title(); ?>
                  </a></h3>
                <span class="maintext10">
                <?php the_date('m/d/y', '',''); ?>
                </span> <div class="maintext" style="text-align:justify"><?php the_content(); ?></div>
                <?php link_pages('<br />Pages: ', '<br />', 'number') ?>
                <hr size="1">
                <!-- // this is just the end of the motor - don't touch that line either :) -->
                <?php endwhile; else: ?>
                <p>
                  <?php _e('Sorry, no posts matched your criteria.'); ?>
                </p>
                <?php endif; ?>

The topic ‘2.5 – Error using Loop on outside PHP page “Object is not a valid feed template”’ is closed to new replies.