Excerpt … the loop? recent posts on another page besides the blog page…
-
I have a website. https://www.aaronrhoades.com/blog is where it’s at right now (will be moving it to https://www.aaronrhoades.com when it’s done).
I’m trying to get the little thing on the upper right corner to work. EVERYTHING IS PERFECT… EXCEPT…. the excerpt is from the home page, rather than from each individual post… how do I fix it?
<?php $args = array( 'numberposts' => '4' ); $recent_posts = wp_get_recent_posts( $args ); foreach( $recent_posts as $recent ){ echo '<li><h3><a href="' . get_permalink($recent["ID"]) . '" title="Look '.esc_attr($recent["post_title"]).'" >' . $recent["post_title"]. "</a></h3>" . get_the_excerpt() . "</li>" ; } ?>
I need them to be list items. I think the problem, lies in “get_the_excerpt” which I had tried using the_excerpt, but that didn’t work either. how do i specify where to grab the excerpt? not sure if I’m in the wrong direction.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Excerpt … the loop? recent posts on another page besides the blog page…’ is closed to new replies.