Tumblr Feed
-
I implemented the following feed to pull in posts from a tumblr blog and it was working for a while, but now it seems to have broken my homepage and I’m not sure why.
Could it be one of the other WP related files? Would you be able to take a look? I’m actually helping a friend redo their site for his band and am setting a up a tumblr blog for them for easier blogging capabilities while on the road.
Is there a way to troubleshoot which WP file is throwing the issue?
OR are there any other recommendations for scripts to feed in posts from tumblr?Code I have added to my template – https://beta.onefewthings.com/ (login is: Darling2013!)
<div id="tumblr-feed"> <?php require_once (ABSPATH . WPINC . '/feed.php'); $rss = @fetch_feed('https://DOMAIN.tumblr.com/rss'); if (!is_wp_error( $rss ) ) : $maxitems = $rss->get_item_quantity(9); $rss_items = $rss->get_items(0, $maxitems); endif; if ($maxitems == 0) echo '<div class="tumblr-post">Nothing to see here, folks. Go to <a href="https://DOMAIN.com">DOMAIN.com for the fun stuff.</div>'; else foreach ( $rss_items as $item ) : ?> <div class="tumblr-post"> <p><?php echo ''.$item->get_date('F j Y'); ?></p> <p><?php echo esc_html( $item->get_title() ); ?></a></p> <p><?php echo string_limit_words($item->get_description(), 40); ?> <a>get_link()); ?>'> read more...</a></p> </div> <?php endforeach; ?> </div>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Tumblr Feed’ is closed to new replies.