Options
- id: Specify the category to compare against by the category’s ID.
- slug: Specify the category to test by the category’s slug.
- name: Use the category’s name to specify the category to test against.
Examples
<?php if(shopp('product','in-category','id=3')) { … } ?>
<?php if(shopp('product','in-category','id=3')): ?> …content to show if the product is in category 3… <?php endif; ?>
See Also
- shopp('product.category')
- shopp('storefront.category-list')
- shopp('storefront.random-products')
- shopp('storefront.breadcrumb')
- shopp('storefront.tag-products')
- shopp('collection.image')
- shopp('storefront.related-products')
- shopp('storefront.category')
- shopp('storefront.product')
- shopp('collection.subcategory-list')
You must be logged in to post a comment.