Simple Pie?

hawke

Power Member
Joined
Nov 14, 2008
Messages
644
Reaction score
435
I'm getting an invalid header error when I try to install this plugin for wordpress. Wether I install it as a theme or plugin, neither way works... any ideas?
 
Just upload it as plugin but don't activate it, on your header.php file from your theme folder just add this line

Code:
<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/wp-content/plugins/simplepie-core/simplepie.inc'; ?>

Then call the simplepie function anywhere on your theme files like ..

Code:
<?php
$twitter = new SimplePie('http://search.twitter.com/search.atom?q=keyword');
$twitter->strip_htmltags(array_merge($twitter->strip_htmltags, array('b', 'a')));
$twitter->enable_cache(true);
$twitter->set_cache_duration(86400);
$twitter->init();
$twitter->handle_content_type();
foreach ($twitter->get_items(0, 5) as $item):
echo $item->get_description();
endforeach;
?>

etc
 
Last edited:
Back
Top