Noob cannot parse WordPress feed
-
I have a wordpress installation linked to from my site (actually on the same server) and I’m trying to display the most recent blog posts in the sidebar of each site page.
Not knowing any better, I downloaded RSS_PHP v3.01 parser and uploaded the unzipped files to the server. I’m working on the theory that I need to process the wordpress posts feed and display it.
The PHP code I inserted in the WordPress index.php for the theme I’m using is not working, and outputs error about not being able to connect.
include_once '../rss_php.3.01/rss_php.php'; $rss = new rss_php; $rss->load('https://domain-name/test/?feed=rss2'); $items = $rss->getItems();
I’m guessing the error is in the rss load url, but I’ve tried several url formats (obviously changing the domain.tld to my own domain) to access the feed:
https://domain.tld/feed/rss2/
Cannot connecthttps://domain.tld/wp-rss2.php
This complains that the file is not XMLhttps://domain.tld/?feed=rss2
Cannot connectDo I need to enable something in the wp installation to ‘activate’ feeds before I can access them?
- The topic ‘Noob cannot parse WordPress feed’ is closed to new replies.