Support » Plugin: WooCommerce » Conditional tags help

  • Hi There,

    I’ve been struggling to use the conditional tags in woocoomerece. I need to add a line of extra text to a speific product page, so I have been trying to write a function and use the conditional tag to have it only appear on a one product,

    function custom_text_box() {
    if (is_product_tag('flowers')) {
    ?>
    <div style="width: 400px; font-family: arial; font-size: 16px; font-weight: bold; color: #2361A1; padding: 12px; border: 3px solid #ccc; margin-bottom: 20px;">
    Isn't this a nice custom function that only appears on the About page?
    </div>
    <?php
    }
    };
    add_action('woocommerce_product_meta_end','custom_text_box');

    However I am not having much luck, any suggestions would be much appreciated.

    http://wordpress.org/plugins/woocommerce/

  • The topic ‘Conditional tags help’ is closed to new replies.