Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Can you only use the LOOP once per page.


Sam Bauers
Participant

@sambauers

Because the loop relies on the $topics global being set by the base index.php file.

$topics = get_latest_topics(false, $page);

You can add this to your template if you like just above that loop, to make sure $topics is always available…

if ( !isset( $topics ) ) {
$topics = get_latest_topics( false, 1 ); // Only fetch the first page
}

Skip to toolbar