{dede:sql sql="SELECT * FROM `dede_arctype` AS t1 JOIN (SELECT ROUND(RAND() * ((SELECT MAX(id) FROM `dede_arctype`)-(SELECT MIN(id) FROM `dede_arctype`))+(SELECT MIN(id) FROM `dede_arctype`)) AS id) AS t2 WHERE t1.id >= t2.id ORDER BY t1.id LIMIT 1"}
<a href='[field:typeurl/]'><span>[field:typename/]</span></a><br>
{/dede:sql}
最后limit 1 改成多条调用。
[field:typedir function='str_replace("{cmspath}","",@me)'/]
由于随机调用非常占用CPU不建议大家使用