Exchange FAQs: How Do I Show the Product Featured Image on Archive/Category Pages

From IThemes Codex
Revision as of 16:26, May 13, 2014 by Elise (Talk | contribs)
Jump to: navigation, search

The Archive/Category pages of your site are controlled by your theme, not by Exchange. This means, by default, those pages won't pull in the featured images for your products.

To have them do this, either in your archive.php or category.php file (whichever file your theme calls, for instance Twenty Eleven calls archive.php), enter the following code right after your loop starts:

<?php it_exchange_set_product( $post->ID ); ?>

Then, where you want the image to show, enter this code:

<?php it_exchange( 'product', 'featured-image', array( 'size' => 'thumbnail' ) ); ?>

So it'll look something like this (example is from the Twenty Eleven archive.php file):


See Also

Quick Links


  • Tutorials - Short video tutorials to help you become an Exchange expert.


Report & Request

← Back to Exchange Codex Home

Personal tools
iThemes Codex
Codex Navigation