php - show last 5 posts that have <!--more--> -
I want to show the last 5 posts in a WordPress page, but when I use this code, this whole post body Will come back while I have & lt ;! - more - & gt;
is in my post and I want to show up to this part. Here's the code I'm using:
& lt; Div & gt; & Lt; Ul & gt; By & lt;? Query_posts ('showposts = 5'); ? & Gt; & Lt ;? Php while (is_pos ()): the_post (); ? & Gt; & Lt; Li & gt; & Lt; A href = "& lt ;? php the_permalink ()? & Gt;" & Gt; & Lt ;? Php the_contenet (); ? & Gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt ;? Php timeline; ? & Gt; & Lt; / Ul & gt; & Lt; / Div & gt;
Change it to-content_excerpt, then it shows the teaser instead of the entire content. .
Comments
Post a Comment