i try to call the content of the recenet posts, not all the content, only the content before 'read more' tag. but it repeats the content of the lastest post. i want to creat one slider with 5 recent posts with post image and short post conent. Can someone please help me !!!! here is my code:
<ul class="slides">
<?php
$args = array( 'numberposts' => '5' );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){
echo '<li>';
$content = get_the_content('Read more');
print $content;
echo '</li> ';
}
wp_reset_query();
?>