2011-05-31 86 views
0

如何显示,我的所有文章缩略图与wordpress中的单个页面上的标题?这里我们只需要使用短代码。我们可能使用jquery或其他人也需要解决。客户询问立即但我们不能解决这个问题。请帮我解决这个问题。如何在wordpress中的单个页面上显示带有标题缩略图的所有帖子?

+0

尝试wordpress.stackexchange.com。你可能会发现更多的答案 – 2011-05-31 07:47:11

+0

要么搜索Wordpress插件,要么在自由职业者网站上发布工作。在这里,您可以通过增加项目预算轻松地让人们从头开始编写代码。 – DarthJDG 2011-05-31 08:11:29

+0

好感谢给你的建议祗园&DarthJDG .... – Ramkumar 2011-05-31 08:56:42

回答

0
<?php$ 
    args = array('numberposts' => -1); 
    // optionally put more arguments here 
    // see wordpress function reference, 'get_posts' 
    // -1 for number of posts displays all 
    $postlist = get_posts($args); 
    foreach ($postlist as $post) { 
     setup_postdata($post); 
     if (has_post_thumbnail()) { 
      echo '<h2><a href="'; 
      the_permalink(); 
      echo '">'; 
      the_title(); 
      echo '</a></h2>'; 
      the_post_thumbnail(); 
      // alter markup and style accordingly 
      // optionally add thumbnail class as function parameter 
      // as previously defined in functions.php 
     } 
    } 
?> 
+0

它的工作fine.thx Pille先生 – Ramkumar 2011-05-31 13:50:45

相关问题