如何在 wordpress 主页中显示更多行?
How to show more lines in wordpress homepage?
在我的 Wordpress 主页上,post 只显示一行描述。如何添加新行?
我想显示更多行。那我该怎么做呢?
在您的主题 function.php 文件中添加以下共享代码:-
/**
* Filter the except length to 100 words.
*
* @param int $length Excerpt length.
* @return int (Maybe) modified excerpt length.
*/
add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 999 );
function wpdocs_custom_excerpt_length( $length ) {
return 100;
}
在我的 Wordpress 主页上,post 只显示一行描述。如何添加新行?
我想显示更多行。那我该怎么做呢?
在您的主题 function.php 文件中添加以下共享代码:-
/**
* Filter the except length to 100 words.
*
* @param int $length Excerpt length.
* @return int (Maybe) modified excerpt length.
*/
add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 999 );
function wpdocs_custom_excerpt_length( $length ) {
return 100;
}