• I’m sure this has been answered before but my searches aren’t yeilding any answers . . .

    Can I list “Recent Posts” outside of the /blog directory where my wordpress is installed? I’d like a list of say a maximum of 5 recent posts to be listed on my homepage but only show the subject line of each post. EG:

    This is a post subject
    Read another post subject
    Very interesting post subject
    Etc Etc Etc

    Any help appreciated!

    Thanks,
    Gavin

Viewing 6 replies - 1 through 6 (of 6 total)
  • Bumping this.

    My site is at https://www.southboundhome.com.
    I’d like to pull the recent posts from my WordPress journal, located at https://www.southboundhome.com/journal/ and from my Links blog, at https://www.southboundhome.com/linkage/ to the index.php page of my root directory.

    Can this be accomplished fairly easily? I’m quite the php novice.

    Yes.
    https://wp-plugins.net/index.php?id=88

    Using that plugin you could do that. To use it as a plugin outside of the wp structure, you will need to include a link to wp-blog-header on the index.php at root, then just use the plugin
    <?php rssLinkList('https://www.southboundhome.com/journal/wp-rss2.php'); ?>

    @podz:

    I’m still getting the fatal error, call to undefined function on teh index.php at root, I’ve left it up to see.

    What does the link need to wp-blog-header need to look like on that page? I thought I had written it correctly, but obviously not.

    Thanks for the help so far.

    On the index.php page where you want the feeds, have this at the top:

    <?php
    require('https://www.southboundhome.com/journal/wp-blog-header.php');
    ?>

    IF that is the blog that has the rss plugin it should work.
    In case your setup is lightly different, it just needs the require to point at the blog-header file.

    Eh, I’m still not getting it to work. I’m getting multiple call errors, and don’t seem to be making any progress. Thanks for trying to help, but I think it’s time for me to give up for a bit.

    Hi Southbound

    I had exactly the same problems as you – I solved them by using the absolute server path for the site, i.e.
    ‘require(‘/home/virtual/siteX/fst/var/www/html/news/blog-header.php’);’
    rather than the URL. This method is also needed in the file rssLinkList.php for the lastRSSPath and cacheDirectory paths.

    HTH

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Listing recent posts by subject outside of wordpress’ is closed to new replies.