hope you can help me with this!

I have a custom page template that pulls in an RSS feed from a separate site (owned by the same guy, my client). While testing the page on my own server, it works beautifully, but when I migrated the theme over to my clients' wordpress install (both are v3.0.1), the feed would not appear, and neither would the page's sidebar or footer. When I investigated further, it appeared that WP simply stops parsing the page template when it hits the feed section.

I suspect a plugin conflict, although I've not been able to replicate the error on my own server, even when I installed the same plugins as my client & configured them similarly. Any ideas as to what may be causing WP to choke? I'd really appreciate any guidance. For reference, here is the RSS feed code I'm using:

// Get a SimplePie feed object from the specified feed source.
$rss = fetch_feed('http://digitaldads.com/feed/');
if (!is_wp_error( $rss ) ) : // Checks that the object is created correctly 
// Figure out how many total items there are, but limit it to 5. 
$maxitems = $rss->get_item_quantity(5); 

// Build an array of all the items, starting with element 0 (first element).
$rss_items = $rss->get_items(0, $maxitems); 

<?php if ($maxitems == 0) echo '<li>No items.</li>';
// Loop through each feed item and display each item as a hyperlink.
foreach ( $rss_items as $item ) : ?>
    <a href='<?php echo $item->get_permalink(); ?>'
    title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'>
    <?php echo $item->get_title(); ?></a>
<?php endforeach; ?>



  • spaces after a closing php tag?
    – edelwater
    Dec 1, 2010 at 11:02

1 Answer 1


Do you see any php errors or warnings?

If not, try temporarily adding this to the top of your functions.php file. It'll cause any php errors to display, and you can troubleshoot from there.

ini_set('display_errors', '1');
  • Oops, submitted too early there (that's what she said) ;) No, the weird thing is that I don't get any errors. It's as if WP just chokes on the code, and decides to stop parsing the rest of the template. Thanks for the code - I'll give it a shot and report back.
    – user1755
    Nov 30, 2010 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.