Display a list of events like you would a list of blog posts without shortcode?
-
With the documentation site being down, I scanned some of the questions here but didn’t find a similar question yet.
I’m looking for a way to display a list of events like you would a list of blog posts… but without shortcode on a page.
For example:
<ul> <?php $args = array( 'numberposts' => '5', 'category' => 4 ); $recent_posts = wp_get_recent_posts( $args ); foreach( $recent_posts as $recent ){ echo '<li style="margin-bottom: 5px;"><a href="' . get_permalink($recent["ID"]) . '">' . $recent["post_title"].'</a> <br />' . date('M d, Y', strtotime($recent['post_date'])).'</li> '; } ?> </ul>
Is this possible? Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Display a list of events like you would a list of blog posts without shortcode?’ is closed to new replies.