Skip to content

Instantly share code, notes, and snippets.

@DxDiagDx
Created August 7, 2020 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DxDiagDx/835c94704045b5b4baa8c09ddbc0f116 to your computer and use it in GitHub Desktop.
Save DxDiagDx/835c94704045b5b4baa8c09ddbc0f116 to your computer and use it in GitHub Desktop.
WOO: условие вывода на страницах WooCommerce, кроме корзины и оформления заказа
add_action( 'woocommerce_before_main_content', 'bbloomer_woo_page' );
function bbloomer_woo_page() {
if ( is_woocommerce() ) {
echo 'This will show on Woo pages';
} else {
echo 'This will show on WP pages';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment