Hi guys, my first post here. On my home page http://www.punchlime.com I have an RSS feed that is bring up the latest 5 blog posts however I now want to add a date when they were posted and have no idea how to do it. The code I am using to get the title is below. I just want to extract the date (not the time) and have no idea how to do that. Any help (and sample code) will be great. Thanks!
<ul class="separated"> <?php if ($maxitems == 0) echo '<li>No items.</li>'; else // Loop through each feed item and display each item as a hyperlink. foreach ( $rss_items as $item ) : ?> <li> <a href='<?php echo esc_url( $item->get_permalink() ); ?>' title='<?php echo 'Posted '.$item->get_date('j F Y | g:i a'); ?>'> <?php echo esc_html( $item->get_title() ); ?></a> </li>
- The topic ‘Show 'posted date' from Feed on homepage’ is closed to new replies.