set_items_for_loop
will set an array of items to be used in a loop. Once you set the items for a loop, you can then use the item helper functions to display item metadata.
Usage
<?php set_items_for_loop($items); ?>
Arguments
- items - An array of items, which can be retried through a number of functions, most notably the get_items and the Theme_API/recent_items helpers.
Examples
Setting Recent Items for Loop
The following example, taken directly from index.php
of the "Default" theme, sets the most recent ten items for a custom loop:
<?php set_items_for_loop(recent_items(10)); ?>