Created
August 7, 2020 07:12
-
-
Save DxDiagDx/b03eda23fed12bf02976929fc9c6f5a4 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_tag_slug' ); | |
function bbloomer_loop_tag_slug() { | |
if ( is_product_tag( 'red' ) ) { | |
echo 'This will show on the Red Tag page'; | |
} elseif ( is_product_tag( 'yellow' ) ) { | |
echo 'This will show on the Yellow Tag page'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment