首页  >  文章  >  后端开发  >  typecho怎么调用图片显示数量?

typecho怎么调用图片显示数量?

WBOY
WBOY原创
2016-06-06 20:24:541314浏览

<code>            <section id="photo-grid">
            <?php while($this->next()): ?>
                <div class="photo-item" data-url="<?php $this->permalink() ?>">
                    <figure class="image-container"><a href="<?php $this->permalink() ?>"><img src="<?php echo img_postthumb($this->content); ?>" /> </a></figure>
                </div>
            <?php endwhile; ?>
            </section>
            </code>

这是调用的代码,首页只显示5个,我现在要显示多个怎么表示?
求解。
typecho怎么调用图片显示数量?

回复内容:

<code>            <section id="photo-grid">
            <?php while($this->next()): ?>
                <div class="photo-item" data-url="<?php $this->permalink() ?>">
                    <figure class="image-container"><a href="<?php $this->permalink() ?>"><img src="<?php echo img_postthumb($this->content); ?>" /> </a></figure>
                </div>
            <?php endwhile; ?>
            </section>
            </code>

这是调用的代码,首页只显示5个,我现在要显示多个怎么表示?
求解。
typecho怎么调用图片显示数量?

已经完美解决~~

<code> <?php $this->widget('Widget_Contents_Post_Recent', 'pageSize=8', 'mid=1')->to($post); ?>
 <?php while($post->next()): ?>
   我是内容
 <?php endwhile; ?>    </code>

typecho怎么调用图片显示数量?

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn