wordpress更改网址
The default excerpt length of WordPress is 55 words. Some one like me may want to change the excerpt length.
WordPress的默认摘录长度为55个字。 像我这样的人可能想更改摘录的长度。
I like the have a smaller excerpt length for the homepage. WordPress provides a interface for changing the default excerpt length. The method is very simple and easy.
我喜欢首页的摘要长度较短。 WordPress提供了一个用于更改默认摘录长度的界面。 该方法非常简单容易。
Put these codes into the function.php file in the theme directory. I prefer 35 in my blog. It can be changed to any number you like. Or this value can be stored in the options table.
将这些代码放入主题目录中的function.php文件中。 我更喜欢博客中的35。 可以将其更改为您喜欢的任何数字。 或者,该值可以存储在选项表中。
The code:
代码:
// excerpt length
function option_excerpt_length($text){
return 35;
}
add_filter('excerpt_length', 'option_excerpt_length');
翻译自: https://www.systutorials.com/change-wordpresss-excerpt-length/
wordpress更改网址