Home  >  Article  >  Backend Development  >  typecho怎么调用图片显示数量?

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

WBOY
WBOYOriginal
2016-06-06 20:24:541363browse

<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%20%24this->permalink()%20?>"><img  src="<?php%20echo%20img_postthumb(%24this->content);%20?>" alt="typecho怎么调用图片显示数量?" > </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%20%24this->permalink()%20?>"><img  src="<?php%20echo%20img_postthumb(%24this->content);%20?>" alt="typecho怎么调用图片显示数量?" > </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怎么调用图片显示数量?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn