<?php $pages = wp_list_pages('title_li=&sort_column=post_date&sort_order=DESC&depth=-1&echo=0');
preg_match_all('/(<li.*?>)(.*?)<\/li>/i', $pages, $matches);
if (!empty($matches[0])) {
print '<ul>' . implode("\n",array_slice($matches[0],0,25)) . '</ul>';}
?>
from this topic
http://wordpress.org/support/topic/116226
🙂
Rafael,
[sig moderated]
Okay, i don’t understand anything of the response above, because i’m not into php (only html and css). But i need something very similar, a simple link on one of my pages, that takes the reader to a random specific page. I have a lot of pages on my site, but it’s only about 32, that i want to be chosen randomly with this link. What do i have to do?
This topic didn’t help me: http://wordpress.org/support/topic/128133?replies=5
Maybe this plugin helps me:
http://wordpress.org/extend/plugins/get-random-page/#post-125
But i’m not sure, because it’s not well explained, what it does and it seems nobody uses it.