get_random_featured_items — Get random featured items.¶
Summary¶
- get_random_featured_items($num = 5, $hasImage = null)¶
Get random featured items.
Parameters: - $num (integer) – The maximum number of recent items to return
- $hasImage (boolean|null) –
Returns: array|Item
Usage¶
Examples¶
To display a given number of featured items on a page, use this function and pass in the number of items desired:
<div id="featured-item">
<h2><?php echo __('Featured Item'); ?></h2>
<?php echo random_featured_items(2); ?>
</div>