WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Conditional tags help (1 post)

  1. mattpitts74
    Member
    Posted 8 months ago #

    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/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.