侧边栏如何加文章缩略图?

模板开发以及发布测试

版主: seita

回复
alexwoo
帖子: 3
注册时间: 2014年 4月 27日 03:08

侧边栏如何加文章缩略图?

帖子 alexwoo »

大家好,我也是刚用typecho,php知识少的可怜,在这里我求教下,如何在侧边栏的最新文章列表里显示为文章的缩略图啊?
我已经安装了fimg插件,
<div class="widget">
<h3><?php _e('最新文章'); ?></h3>
<ul>
<?php $this->widget('Widget_Contents_Post_Recent')
->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
</ul>
</div>
这是侧边栏的代码,然后调用文章缩略图的代码是 <img src="<?php Fimg_Plugin::showfimg($this->cid,1);?>">
这样怎么 把图片加上去呢?求救,谢谢

网站是http://www.thezui.com
lzabcv
帖子: 199
注册时间: 2011年 2月 25日 14:56
联系:

Re: 侧边栏如何加文章缩略图?

帖子 lzabcv »

http://yijile.com/log/365.html
不知道是不是你想要的

实现是 通过缩略图插件,然后在添加一个最新列表 加入缩略图的代码。。。
其实可以不要插件
www.gusuz.com
帖子: 62
注册时间: 2013年 12月 6日 23:09

Re: 侧边栏如何加文章缩略图?

帖子 www.gusuz.com »

<div class="widget">
<h3><?php _e('最新文章'); ?></h3>
<ul>
<?php $this->widget('Widget_Contents_Post_Recent')->to($index); ?>
<?php while($this->next()): ?>
<li><a href="<?php $index->permalink() ?>"><?php $index->title() ?></a></li>
<img src="<?php Fimg_Plugin::showfimg($index->cid,1);?>">
<?php endwhile; ?>
</ul>
</div>
you6116
帖子: 9
注册时间: 2017年 10月 4日 22:21

Re: 侧边栏如何加文章缩略图?

帖子 you6116 »

www.gusuz.com 写了:<div class="widget">
<h3><?php _e('最新文章'); ?></h3>
<ul>
<?php $this->widget('Widget_Contents_Post_Recent')->to($index); ?>
<?php while($this->next()): ?>
<li><a href="<?php $index->permalink() ?>"><?php $index->title() ?></a></li>
<img src="<?php Fimg_Plugin::showfimg($index->cid,1);?>">
<?php endwhile; ?>
</ul>
</div>


可以用哎!超感谢!
回复