Last active
August 7, 2020 06:39
-
-
Save DxDiagDx/c0935e6963cb3feac978d909da5ae8e0 to your computer and use it in GitHub Desktop.
WOO: условие вывода для всех категорий
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'woocommerce_before_main_content', 'bbloomer_loop_cat' ); | |
function bbloomer_loop_cat() { | |
if ( is_product_category() ) { | |
echo 'Это сообщение видно только на страницах категорий'; | |
} else { | |
echo 'Это сообщение видно на всех остальных страницах WooCommerce'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment