Difference between revisions of "Exchange FAQs: How Do I Show the Product Featured Image on Archive/Category Pages"

From iThemes Codex
Jump to: navigation, search
(See Also)
(See Also)
Line 24: Line 24:
 
==See Also==
 
==See Also==
  
 +
*[[:Exchange_FAQs:_Do_I_Have_to_Use_an_iThemes_Theme_with_Exchange|Do I Have to Use an iThemes Theme with Exchange]]
 
*[[:Exchange_FAQs:_How_Do_I_Change_Where_the_User_Redirects_to_After_Logging_Out|How Do I Change Where the User Redirects to After Logging Out]]
 
*[[:Exchange_FAQs:_How_Do_I_Change_Where_the_User_Redirects_to_After_Logging_Out|How Do I Change Where the User Redirects to After Logging Out]]
 
*[[:Exchange_FAQs:_How_Do_I_Create_Custom_Styles_for_Exchange|How Do I Create Custom Styles for Exchange]]
 
*[[:Exchange_FAQs:_How_Do_I_Create_Custom_Styles_for_Exchange|How Do I Create Custom Styles for Exchange]]

Revision as of 20:30, 5 June 2014

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):


ShowProductFeaturedImages.png



See Also

Quick Links

Resources

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

Support

Report & Request


← Back to Exchange Codex Home