Typecho首页文章字数自动截取
一、Typecho首页本身自带的不带格式自动截取<?php $this->description(); ?>
二、首页文章不带格式自动截取摘要<?php $this->excerpt(30, '...'); ?>//30代表显示的字数
三、首页文章带格式自动截取
<?php
preg_match_all('/<p>.*?<\...
一、Typecho首页本身自带的不带格式自动截取<?php $this->description(); ?>
二、首页文章不带格式自动截取摘要<?php $this->excerpt(30, '...'); ?>//30代表显示的字数
三、首页文章带格式自动截取
<?php
preg_match_all('/<p>.*?<\...
typecho模板常用代码汇总
站点动态标题
<?php $this->archiveTitle(array(
'category'=>_t('分类 %s 下的文章'),
'search'=>_t('包含关键字 %s 的文章'),
'tag' =>_t('标签 %s 下的文章'),
'author'=>_t('%s 的主页')
), '', ' - '); ?>
站点地址,名称与描述
<?php $this-&...