Typecho在主题模板functions.php里面添加下面代码,你就会发现你在Typecho后台撰写新文章时候下面自定义字段就会有相关的输入框了!

在主题里面添加函数

function themeFields($layout) {
$thumbmine = new Typecho_Widget_Helper_Form_Element_Text('thumbmine', NULL, NULL, _t('自定义缩略图'), _t('.png或.jpg'));
$layout->addItem($thumbmine);
}

引用Typecho文章自定义字段

<?php $this->fields->thumbmine();?>

大功告成!