
<?php $this->related(5)->to($relatedPosts); ?>
<?php while ($relatedPosts->next()): ?>
<a href="<?php $relatedPosts->permalink(); ?>" title="<?php $relatedPosts->title(); ?>"><?php $relatedPosts->title(); ?></a>
<?php endwhile; ?>打开 /var/Widget/Contents/Related.php 文件
找到
->order('table.contents.created', Db::SORT_DESC)修改成
->order('RAND()')保存,完成。
]]>