The three most recent posts in different div's, how?
-
Hello everybody,
I work at the following project:
https://cl.ly/image/1e1X271T0k3PI want the three most recent post all in different div’s. How can I do this? The first one is easy:
<div id="firstfield"> <ul> <?php global $post; $args = array( 'numberposts' => 1, 'offset'=> 1 ); $myposts = get_posts( $args ); foreach( $myposts as $post ) : setup_postdata($post); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <li><?php $excerpt = get_the_excerpt( $deprecated ) ?></li> <?php endforeach; ?> </ul>
Right?
Regards,
Marijn
- The topic ‘The three most recent posts in different div's, how?’ is closed to new replies.