douzhong8856 2012-10-08 16:36
浏览 28

too long

I have published a site on a test url, everything works fine apart from one page I have set to appear a certain category of posts but the most recent post does not appear, if I post another article under that category it pushes the second to last one on the page but still doesn't show the most recent one I posted..Please help..

http://www.scriptposter.com/new/category/gallery/

It pulls it though fine on the homepage tho,

Home http://www.scriptposter.com/new/

Here is the code I am using :

<?php while ( have_posts() ) : the_post() ?>
<div class="secondColumn">
<div class="blogFeatureWorkImage">"><?php the_post_thumbnail('small-thumb'); ?></div>
</div>
<div class="thirdColumn2">
<div class="blogFeatureWorkContent">
<h1 class="articleTitle"><span class="yellow">"><?php the_title();?></span></h1>
<p><?php the_content();?></p>
</div>
</div>
<div class="clear"></div>
<?php endwhile; ?>
  • 写回答

1条回答 默认 最新

  • dongshan9338 2012-10-09 03:44
    关注

    Assuming the code you provided is from the gallery category page, this might be an issue with the way posts are being queried. It should work by default the way you're doing it, but you could try hard-coding a new query on the gallery page like this.

    Try putting this directly before the while statement to troubleshoot:

    <?php 
    query_posts( array ( 'category_name' => 'gallery', 'posts_per_page' => -1 ) ); 
    ?>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 qgcomp混合物线性模型分析的代码出现错误:Model aliasing occurred
  • ¥100 已有python代码,要求做成可执行程序,程序设计内容不多
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥100 求采集电商背景音乐的方法
  • ¥15 数学建模竞赛求指导帮助
  • ¥15 STM32控制MAX7219问题求解答
  • ¥20 在本地部署CHATRWKV时遇到了AttributeError: 'str' object has no attribute 'requires_grad'