So, I moving my site from PHP script to wordpress, and I have quite a few feeds that display news for me, along with the Premier League Table. So I was wondering, how can I show these pages in Wordpress? I have tried just pasting the information in, but to no avail. This is an example of one of the feeds, that then outputted onto another page. <?php $insideitem = false; $tag = ''; $title = ''; $description = ''; $link = ''; function startElement($parser, $name, $attrs) { global $insideitem, $tag, $title, $description, $link; if ($insideitem) { $tag = $name; } elseif ($name == 'ITEM') { $insideitem = true; } } function endElement($parser, $name) { global $insideitem, $tag, $title, $description, $link; if ($name == 'ITEM') { printf('<p><b><a href=\'%s\'>%s</a></b><br>', trim($link),trim($title)); printf('%s</p>'."\n",trim($description)); $title = ''; $description = ''; $link = ''; $insideitem = false; } } function characterData($parser, $data) { global $insideitem, $tag, $title, $description, $link; if ($insideitem) { switch ($tag) { case 'TITLE': $title .= $data; break; case 'DESCRIPTION': $description .= $data; break; case 'LINK': $link .= $data; break; } } } $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, 'startElement', 'endElement'); xml_set_character_data_handler($xml_parser, "characterData"); $fp = fopen('http://newsapi.bbc.co.uk/feeds/search/news+sport/everton','r') or die('Error reading RSS data.'); while ($data = fread($fp, 4096)) { xml_parse($xml_parser, $data, feof($fp)) or die(sprintf('XML error: %s at line %d', xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); } fclose($fp); xml_parser_free($xml_parser); ?> PHP: Thanks
If your theme is widget ready, you can put it in the sidebar with widgets by choosing RSS. If not, you can find a plug in to do it.
It is widget ready... Although, I really only want the table in the sidebar, the rest on pages in WP. Any ideas?
I know there is a plugin to do that but I am not sure what it is called now. Goto wordpress.org and search the plug ins for RSS feed and i am sure you will find it.