Hey 0zz,
The requirement to display completely random posts cannot be fulfilled with the
You can completely customize the foreach function, eg:
What do you mean? Of course they work, eg in a special page View tab:
The requirement to display completely random posts cannot be fulfilled with the
get_
function; that's why you need to do some additional processing, and cannot use all its handy parameters. The code I provided is intended to work as a replacement for the 'search' type of display (but in a theme template, not in the special page fields, in a case like the example you provided about random linked articles).You can completely customize the foreach function, eg:
PHP Code:
<?php
foreach ($items_to_show as $index) {
$article = $searchresults['results'][$index];
echo '<div class="article">';
echo '<h4>' . $article->title . '</h4>';
echo 'Published on: <time datetime="' . $article->pubDate . '">' . $article->pubDate . '</time>';
echo '<p>' . $article->getExcerpt($article->content, 50) . '</p>';
echo '</div>';
}
?>
Quote:Output display settings in SpecialPages plugin do not work, obviously..
What do you mean? Of course they work, eg in a special page View tab:
PHP Code:
<?php
echo '<h1>'; get_special_field('title'); echo '</h1>';
echo '<div class="content">'; get_page_content(); echo '</div>';
?>