Conditional if statement for a particular WP page
-
I am using Woo Commerce plugin and I want to display extra text for a specific product page. The product ID seen in my body is: single single-product postid-2624
So I tried the following code but it didn’t work:
<?php function ip_more_content() { if ( is_single('2624'); ) { echo 'show something'; } else { echo ''; } } add_action( 'woocommerce_product_thumbnails' , 'ip_more_content', 9 ); ?>
How can I make WP do something based on a specific product id?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Conditional if statement for a particular WP page’ is closed to new replies.