1

Backstory: I have a WordPress install where the core single post/archive type was utilized for a CPT by a previous developer. I was requested by the client to create a separate WordPress install for their blog, and I've been using fetch_rss to feed the Blog Posts onto the main WP install. Both are different themes(not that I think that's the issue). Everything was fine until we tried to post a new article, and it will not display now in my "feed" on the homepage. Ive tried a few things I've researched with it being a cache issue, but none seem to fix. Hoping someone can help. Here is my code for the feed part on the main WordPress site:

    <div class="row">
    <style>.blog:first-of-type {border-left: 0px solid #015570;}</style>
    <?php
    include_once(ABSPATH.WPINC.'/rss.php'); // path to include script
    $feed = fetch_rss('http://www.thcenter.org/blog/feed/'); // specify feed url
    $items = array_slice($feed->items, 0, 4); // specify first and last item
    ?>

    <?php if (!empty($items)) : ?>
    <?php foreach ($items as $item) : ?>
    <div class="col-md-3 text-center blog">
        <h4 class="blog-title"><a href="<?php echo $item['link']; ?>"><?php echo $item['title']; ?></a></h4>
        <div class="teal featured-image"><p><?php echo $item['description']; ?></p></div>
        <div class="text-center breathe"><a href="<?php echo $item['link']; ?>" class="btn btn-teal">Read More</a></div>
    </div>
    <?php endforeach; ?>
    <?php endif; ?>
</div>

Main Wordpress site: http://www.thcenter.org/ Blog Install: http://www.thcenter.org/blog/

The feed at http://www.thcenter.org/blog/feed/ is showing latest posts. Any clues?

  • I have exactly the same issue - I see the new post in the feed when I go to domain.com/feed and I am logged in but if I go to the same page in an incognito browser the latest post isn't there. Do you see the same thing? – williamsdb Jun 25 '18 at 09:21
  • @williamsdb actually I can still see the new post in incognito, at first I assumed it may be a caching issue, but I've tried multiple things at attempt to purge the cache, and it still will not display in my RSS feed. Im not sure if maybe this is hosting server cache issue? – Chris Rinehart Jun 25 '18 at 14:38
  • Do you use anything like Cloudflare? – williamsdb Jul 02 '18 at 13:27

0 Answers0