我试图在网站和其他论坛上找到答案,但一无所获。我会尽力解释我的问题。我需要更改我的WordPress网站,以便在主页上的“最新新闻”中显示所有新闻文章的小图像。如果这很重要,我正在使用headway主题编辑器。
upd:根据评论中的要求,以下是my website.
我试图在网站和其他论坛上找到答案,但一无所获。我会尽力解释我的问题。我需要更改我的WordPress网站,以便在主页上的“最新新闻”中显示所有新闻文章的小图像。如果这很重要,我正在使用headway主题编辑器。
upd:根据评论中的要求,以下是my website.
如上所述,此链接可以帮助您实现以下目标:http://codex.wordpress.org/Post_Thumbnails
您需要将thumnail大小添加到函数中。php类:
the_post_thumbnail(); // without parameter -> Thumbnail
the_post_thumbnail(\'thumbnail\'); // Thumbnail (default 150px x 150px max)
the_post_thumbnail(\'medium\'); // Medium resolution (default 300px x 300px max)
the_post_thumbnail(\'large\'); // Large resolution (default 640px x 640px max)
the_post_thumbnail(\'full\'); // Original image resolution (unmodified)
the_post_thumbnail( array(100,100) ); // Other resolutions
然后,在循环中调用图像的主题模板中(例如loop.php),您需要将图像代码更改为:<?php if(has_post_thumbnail()) { the_post_thumbnail(\'thumbnail\'); ?> // which will get you an image of 150x150
我正在使用这个get\\u posts数组按评论检索前15个热门帖子。问题是,它显示了所有那些在博客中添加的评论很高的帖子。因此,列表有时会发生变化,但大部分时间保持不变。如何限制/显示过去7天的帖子?这将显示上周评论最多的帖子。谢谢这是我的代码:global $post; $args = array( \'orderby\' => \'comment_count\', \'order\' => \'DESC\' , \'numberposts\' =