我使用以下内容来调用摘录以显示,但它显示了完整的帖子:-
这是我的功能:-
add_action( 'init', 'my_add_excerpts_to_pages' );
function my_add_excerpts_to_pages() {
add_post_type_support( 'page', 'excerpt' );
这也是我的查询
<?php
// retrieve one post with an ID of 5
query_posts( 'p=1' );
// set $more to 0 in order to only get the first part of the post
global $more;
$more = 0;
// the Loop
while (have_posts()) : the_post();
the_content( 'Read the full post »' );
endwhile;
?>
请问你能建议吗?谢谢