collection-{slug}.php content template

content template used for a specific collection of products by collection slug.

The collection-{slug}.php content template file is used for the content of a specific product collection page, specified by category/tag/term ID. The collection-{slug}.php content template is more specific than category.php or collection.php.

collection-{slug}.php has the identical use as the category-{slug}.php template, but is named more properly, as both templates are used for specific product collections, which can represent collections based on product categories, tags, and other product taxonomy terms, not just categories.

You can also use the slug of a preprogrammed product collection (Smart Collections docs) to theme the content of those collections.

Installation

This template file is used when located in the shopp subdirectory of your theme.

For instance, if your “My Theme” WordPress theme is located at:

/my-site/wp-content/themes/my-theme/

Any Shopp content templates should be added to:

/my-site/wp-content/themes/my-theme/shopp/

Some of the more general content templates have examples that can be installed in your theme, using the Content Template Starter Set. The Content Template Starter Set can be installed from your WordPress Admin by navigating to Shopp → Setup → Presentation → Theme Templates.

Examples

None of the following are in the content template starter set, but can be added for specific collections:

  • collection-catalog.php used for preprogrammed product collection of all catalog products (can be loaded by page request or shopp(‘storefront’,’catalog-products’) Theme API call).
  • collection-new.php used for preprogrammed product collection of new products (can be loaded by page request or shopp(‘storefront’,’new-products’) Theme API call).
  • collection-featured.php used for preprogrammed product collection of featured products (can be loaded by page request or shopp(‘storefront’,’featured-products’) Theme API call).
  • collection-onsale.php used for preprogrammed product collection of on-sale products (can be loaded by page request or shopp(‘storefront’,’onsale-products’) Theme API call).
  • collection-bestsellers.php used for preprogrammed product collection of best selling products (can be loaded by page request or shopp(‘storefront’,’bestselling-products’) Theme API call).
  • collection-search-results.php used for product collection of search results (can be loaded by page request or shopp(‘storefront’,’search-results-products’) Theme API call).
  • collection-random.php used for preprogrammed product collection of random products (can be loaded by page request or shopp(‘storefront’,’random-products’) Theme API call).
  • collection-viewed.php used for preprogrammed product collection of viewed products (can be loaded by page request or shopp(‘storefront’,’viewed-products’) Theme API call).
  • collection-t-shirts.php used for product category (or tag, term) with slug t-shirt (can be loaded by page request or Theme API calls).
  • collection-apple.php used for product tag (or category, term) with slug apple (can be loaded by page request or Theme API call).
  • collection-tag.php used for preprogrammed product collection of tag products (not loaded for WordPress product tag page requests, only by the shopp(‘storefront’,’tag-products’) Theme API call).
  • collection-related.php used for preprogrammed product collection of related products (not loaded on any WordPress product collection page request, only by the shopp(‘storefront’,’related-products’) Theme API call).
  • collection-alsobought.php used for preprogrammed product collection of products also bought (not loaded on any WordPress product collection page request, only by the shopp(‘storefront’,’also-bought-products’) Theme API call).
  • collection-promo.php used for preprogrammed product collection of promo products (not loaded on any WordPress product collection page request, only by the shopp(‘storefront’,’promo-products’) Theme API call).

Loading Smart Collections via Page Requests

Each of the preprogrammed product collections (Smart Collections docs) can be viewed through a page request to /shop/collection/[slug]. For example, the following url would show the On Sale items:

http://domain.com/shop/collection/onsale/

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar