is_shopp_page()

determines if the requested page is a Shopp page or if the current loaded query is a Shopp product, product taxonomy, or product collection.

is_shopp_page ($page)

@param string $page (optional) System page name for the correct Storefront page @see Storefront::default_pages()
@return boolean

Description

determines if the requested page is a Shopp page or if the current loaded query is a Shopp product, product taxonomy, or product collection.

This function checks is_shopp_collection(), is_shopp_taxonomy(), is_shopp_product(), and the also the current query_var ‘shopp_page’ against your current set of page settings.

Example

add_action('parse_request', 'load_my_custom_scripts', 11);

function load_my_custom_scripts () {
    if ( is_shopp_page() ) {
        // load my custom scripts only on Shopp pages
        wp_enqueue_script('my_custom_shopp_scripts','/path/to/my/custom-script.js');
    }
}

See Also

You must be logged in to post a comment.

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

Skip to toolbar