Maison  >  Article  >  développement back-end  >  typecho怎么调用图片显示数量?

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

WBOY
WBOYoriginal
2016-06-06 20:24:541312parcourir

<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怎么调用图片显示数量?

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn