宁静的心灵,深睿的思想

- 字数截取 -

Typecho首页文章字数自动截取

March 29th , 2019

杂谈   406人阅读    0 人评论

一、Typecho首页本身自带的不带格式自动截取
<?php $this->description(); ?>

二、首页文章不带格式自动截取摘要
<?php $this->excerpt(30, '...'); ?>//30代表显示的字数

三、首页文章带格式自动截取

<?php
preg_match_all('/<p>.*?<\...

Read More

阅读原文
typecho 字数截取
1 / 1
  • 首页
  •    
  • 琐记
  •    
  • 随笔
  •    
  • 文字
  •    
  • 杂谈
  •    
  • 动漫
  •    
  • 文章
  •    
  • 关于
  •    
  • 归档
  •    
  • 友链
  •    
  • 留言
  •    
  • 标签
  •    
  • 繁體
Theme is Typescript designed by Art Chen & modified by Dr.DonHo / Powered by Typecho.
© 2021 浮生志
Index Bio
No Index
DonHo
宁静的心灵,深睿的思想
  • 文章
  • 关于
  • 归档
  • 友链
  • 留言
  • 标签
  • 如影相随
  • 医道博客
  • 文章:42篇
  •    
  • 分类:5个

  • 评论:18条
  •    
  • 页面:6个