Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

CSS help with a code snippet

Home / Forums / Virtue Theme / CSS help with a code snippet

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
October 21, 2015 at 12:12 pm

I have a code snippet added to functions:

// Add custom field to shop loop
add_action( 'woocommerce_after_shop_loop_item_title', 'ins_woocommerce_product_excerpt', 35, 2);
if (!function_exists('ins_woocommerce_product_excerpt'))
{
function ins_woocommerce_product_excerpt() {
global $post;
if ( is_home() || is_shop() || is_product_category() || is_product_tag() ) {
echo '<span class="excerpt"';
echo get_post_meta( $post->ID, 'loopdesc', true );
echo '</span>';
}
}
}

where looopdesc is a custom field to show an announcement for the items. I just need some help with the CSS for this span class=”excerpt” — I want the text to be Red, or a color of my choice. Is it possible to edit the code?

Also, I have the condition to show this custom field on home, shop, category and tag pages, but the home page still doesn’t have it….

Thanks!

  • The forum ‘Virtue Theme’ is closed to new topics and replies.