0
我想在wordpress中插入一個插件,但不包含特殊問題。只有帖子。我將在這4篇文章之間獲得4篇文章和1篇精選影像。客人將選擇精選圖像的正確標題。我得到隨機帖子;在wordpress中選擇一個隨機帖子
<ul>
<?php $posts = get_posts('orderby=rand&numberposts=4'); foreach($posts as $post) { ?>
<li><p desc="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></p>
</li>
<?php } ?>
</ul>
但我無法解決我將如何隨機選擇正確的答案,並得到它的特色圖像作爲一個問題。
請幫助