Title: Adding inventory to custom loop
Last modified: January 26, 2017

---

# Adding inventory to custom loop

 *  [VanBrent](https://wordpress.org/support/users/vanbrent/)
 * (@vanbrent)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/adding-inventory-to-custom-loop/)
 * Dear Ronald
    I have installed the ithemes exchange custom loop add-on. I have
   now a fantastic grid showing my products. I want to show the inventory on this
   grid as well. where can I add / change stuff like: ———— <?php $inventory = it_exchange(‘
   product’, ‘inventory’, ‘return=true’ );
 * if ( 0 == $inventory ) {
    echo ‘Helaas, dit product is niet meer op voorraad!’;//
   We’re completely out } elseif ( 1 == $inventory ) { echo ‘Er is er nog maar 1!’;//
   There is one in stock } else { printf( ‘We hebben er %s op voorraad.’, number_format(
   $inventory, 0, null, ‘,’ ) ); } ?>
 * —-
 * Hope you can help me out
 * Brent

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [ronaldvw](https://wordpress.org/support/users/ronaldvw/)
 * (@ronaldvw)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/adding-inventory-to-custom-loop/#post-8708465)
 * Hi,
 * the custom loop add-on only manipulates the loop, it filters, and changes the
   order in which products are displayed. The content of the products is provided
   by the default Exchange templates, these are not part of the custom loop add-
   on.
 * So re. “where can I add / change stuff like”, you would do that by copying the
   template file for the product to your active theme in a folder named “exchange”,
   observing the entire file path, and edit that template file.
 * I realise that you have added a support request at iThemes, and that you were
   referred here, but the add-on does not contain any template files.
 * Check this out though: [https://ithemes.com/forum/topic/68646-tags-and-category-added-in-product-page/#entry288588](https://ithemes.com/forum/topic/68646-tags-and-category-added-in-product-page/#entry288588)
 *  Thread Starter [VanBrent](https://wordpress.org/support/users/vanbrent/)
 * (@vanbrent)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/adding-inventory-to-custom-loop/#post-8725736)
 * Just to be clear. Which element is ‘your’ loop using? Then I can use that element,
   place it in the exchange folder of my childtheme and add the inventory. (Which
   is originally a little element itself.)
 *  Plugin Author [ronaldvw](https://wordpress.org/support/users/ronaldvw/)
 * (@ronaldvw)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/adding-inventory-to-custom-loop/#post-8726285)
 * The loop is using the `content-store/elements/product` template part to display
   a product, as does the default Exchange Store page.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Adding inventory to custom loop’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/exchange-addon-custom-loop.svg)
 * [iThemes Exchange - Custom Loop Add-on](https://wordpress.org/plugins/exchange-addon-custom-loop/)
 * [Support Threads](https://wordpress.org/support/plugin/exchange-addon-custom-loop/)
 * [Active Topics](https://wordpress.org/support/plugin/exchange-addon-custom-loop/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/exchange-addon-custom-loop/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/exchange-addon-custom-loop/reviews/)

## Tags

 * [inventory](https://wordpress.org/support/topic-tag/inventory/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * 3 replies
 * 2 participants
 * Last reply from: [ronaldvw](https://wordpress.org/support/users/ronaldvw/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/adding-inventory-to-custom-loop/#post-8726285)
 * Status: not resolved