• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

CPT featured image does not display on category pages

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › CPT featured image does not display on category pages

This topic is: not resolved

Tagged: category page, CPT, exchange ecommerce

  • This topic has 4 replies, 2 voices, and was last updated 12 years ago by Brad Dalton.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • June 1, 2014 at 10:51 am #107753
    psillari
    Member

    WordPress Environment
    Genesis Framework – parent theme
    Dynamik Website Builder – child theme
    iThemes Exchange ecommerce plugin

    Issue
    The Exchange product posts which have been categorized via Exchange categories display in their appropriate category pages but without the featured image that is displaying in the individual product posts.

    Goal
    I want the Product listing on the category pages to show the product featured image as well as the descriptive text which is showing.

    Exchange Instruction
    iThemes notes that the Archive/Category pages of a site are controlled by the theme and not by Exchange and thus, by default, those pages won't pull in the featured images for the products listed on a category page.

    To have the images display, either in the archive.php or category.php file (whichever file my theme calls) I need to enter the following code right after the loop starts:
    <?php it_exchange_set_product( $post->ID ); ?>

    Then to have the image appear where I want I enter the following code in the appropriate place:
    <?php it_exchange( 'product', 'featured-image', array( 'size' => 'thumbnail' ) ); ?>

    My Skills
    I have intermediate HTML & CSS skills but no real PHP skills – basically I can follow instructions and cut and paste.

    What I’ve Tried
    I attempted several times to create a custom category page following different tutorials and include the above code but I’m obviously missing something in the coding of the pages as I have been unsuccessful.

    I think part of the problem is I’m not using the correct file to base my custom category page on. I don’t see where the loop starts so don’t know where to insert the above code. And since my PHP skills are nil I am unable to understand what’s going on with the code or spot my obvious errors in coding.

    I also tried using the Custom Hooks feature of Dynamik but wasn’t successful there either.

    At this point I’m going in circles and need some direction/help in solving my problem.

    Pete

    June 1, 2014 at 12:15 pm #107766
    Brad Dalton
    Participant

    You could hook it in from your child themes functions file conditionally using the loop_start hook.

    The code you embedded is broken. You might want to embed it properly then it can be tested in different solutions.

    Couldn't find a link to your archive page which would help people help you.


    Tutorials for StudioPress Themes.

    June 1, 2014 at 2:02 pm #107769
    psillari
    Member

    Brad,

    Thanks for the quick reply and for pointing out my oversight re; the code.

    Here is the code, hopefully now formatted correctly, which is suggested to be placed right after the loop starts

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

    The code for placement is

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

    The site I'm working on requires a logon to get to the development area. Happy to send it via email or a private reply if requested.

    If I understand your suggestion I would place the hook in the functions file via Dynamik's Custom Function feature to enter it into the child's (Dynamik) function.php file.

    Would your display images from your images folder article apply here as well as another option?

    June 1, 2014 at 2:04 pm #107770
    psillari
    Member
    This reply has been marked as private.
    June 1, 2014 at 2:32 pm #107773
    Brad Dalton
    Participant

    Sorry but only moderators receive PM's.

    Just wanted to have a look at the source code of the archive and the body classes.

    Another option is to code a archive-cpt.php file.

    The display images tutorial is not for featured images but there's many other code snippets which are.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble