Functions/display random featured collection

The display_random_featured_collection() helper function returns the HTML markup for displaying a random collection that has been marked as "featured," and is most commonly used on the home page of public themes. Since the HTML is pre-formatted, any changes to the HTML syntax must be made by writing out the necessary code instead of using the helper function. See random_featured_collection for help with getting the collection object of a random featured collection.

Usage

<?php display_random_featured_collection(); ?>

Arguments

None

Examples

To print the random featured collection content, with an image, use the following code:

<?php echo display_random_featured_collection(); ?>
.

The HTML generated by display_random_featured_collection() is:

<h2>Featured Collection</h2>
<h3><a href="http://example.com/collections/show/44">Collection Title</a></h3>
<p class="collection-description">Collection description here....</p>