is_shopp_taxonomy()

determines if the current request is for a Shopp product taxonomy.

is_shopp_taxonomy ()

@return bool true if current page request is for a Shopp product taxonomy, else false.

Description

determines if the current request is for a Shopp product taxonomy.

Product taxonomies are a type of Shopp product collection, however because Shopp product taxonomies page requests are handled through the WordPress taxonomy API, only Shopp product taxonomies requests will cause this function to return true. Other product collections requests, such as Shopp smart collections, would be handled with the is_shopp_collection() function.

When this function returns true, a call to ShoppCollection() will return the requested ProductTaxonomy object. Also, because the global product context is set by the page request, shopp(‘collection’) or shopp(‘category’) theme api calls can be used safely when this function returns true.

Example

if ( is_shopp_taxonomy() ) {
    // do product taxonomy specific code
}

See Also

You must be logged in to post a comment.

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

Skip to toolbar