因此,我使用此功能在页面上启用了自定义摘录。
add_action(\'init\', \'page_excerpts\');
function page_excerpts() {
add_post_type_support( \'page\', \'excerpt\' );
}
然而,当我在摘录字段中输入数据时,循环中仍会返回内容,而不是新添加的摘录。<?php the_excerpt(); ?>
我是否需要做任何其他事情来强制从页面上的摘录字段中提取内容?因此,我使用此功能在页面上启用了自定义摘录。
add_action(\'init\', \'page_excerpts\');
function page_excerpts() {
add_post_type_support( \'page\', \'excerpt\' );
}
然而,当我在摘录字段中输入数据时,循环中仍会返回内容,而不是新添加的摘录。<?php the_excerpt(); ?>
我是否需要做任何其他事情来强制从页面上的摘录字段中提取内容?Perhaps try this:
<?php
global $more;
$more = false;
?>
<?php the_content(\'<span>Continue Reading</span>\'); ?>
<?php $more = true; ?>
我有一个标准的Wordpress循环显示项目: $loop = new WP_Query( array( \'post_type\' => \'images\', \'orderby\' => \'menu_order\', ) ); while ( $loop->have_posts() ) : $loop->the_post();