Support » Plugins » Simplepie RSS

  • I’m using SimplePie to display an RSS feed in WordPress. For some reason the get_date() function is returning nothing? Here’s my code below. Could it be an issue with my feed?

    [ Mod note: it’s the backtick character for code not the single quote. Or use the code button, that works too. ]

    <h3><span class="dark-blue">news</span> & media</h3>
    <?php $feed = fetch_feed( '' );
    foreach ( $feed->get_items() as $item ) {
        printf( '
    <li><a href="%s"><strong>%s</strong></a>', $item->get_permalink(),
        $item->get_title() );
        printf( '<p>%s</p>', $item->get_description() );
        printf( '<p>%s</p>', $item->get_date() );
        printf( '<a href="%s">read more</a></li>
    ', $item->get_permalink() );
  • The topic ‘Simplepie RSS’ is closed to new replies.