* While inventory does not use the WP post types, it does model functions after the WP core functions * to provide similar functionality * */ if (wpinventory_is_single()) { wpinventory_get_template_part('single-item'); return; } wpinventory_get_items(); echo wpinventory_filter_form('filter=true&sort=true'); global $inventory_display; $inventory_display = wpinventory_get_display_settings('listing'); if (wpinventory_have_items()) { ?> <table class="wpinventory_loop wpinventory_loop_category wpinventory_loop_category-<?php echo wpinventory_get_the_category_ID(); ?> "> <thead> <tr> <?php if (wpinventory_get_config('display_listing_labels')) { foreach ($inventory_display as $sort => $field) { ?> <th class="<?php echo wpinventory_label_class($field); ?> "><?php wpinventory_the_label($field); ?> </th>
function wpinventory_class() { $WPIMLoop = wpinventory_get_wpim(); $class = 'wpinventory_item'; $class .= ' wpinventory_item' . $WPIMLoop->get_even_or_odd(); $class .= ' wpinventoryitem-' . wpinventory_get_the_ID(); $class .= ' wpinventoryitem-category-' . wpinventory_get_the_category_ID(); echo $class; }