is_shop()
Is_shop - Returns true when viewing the product type archive (shop).
No Hooks.
Return
true|false
.
Usage
is_shop();
Examples
#1 Check if the current page is the home page of the store
if ( is_shop() ) { echo 'This is the home page of the store!'; } else { echo 'This is some other page.'; }
is_shop() is shop code WC 9.5.1
function is_shop() { return ( is_post_type_archive( 'product' ) || is_page( wc_get_page_id( 'shop' ) ) ); }