How can i style “echo apply_filters”

Colors

With wordpress I have years of experience but with PHP I do not have much experience. I want the avalible product colors on the shop page and that’s working! 🙂

But i want a tekst before the avalible colors and i want to style it.
I tried a lot of things but my knowledge is limited.

Can someone help me? Thanks!

This is the code right now:

function custom_display_post_meta() {
global $product;
$attr = array('pa_kleur');
foreach ( $attr as $attribute ) {
$values = wc_get_product_terms( $product->id, $attribute, array( 'fields' => 
'names' ) );
echo apply_filters ( 'woocommerce_attribute', wpautop( wptexturize( implode( 
', ', $values ) ) ), $attribute, $values );
}
}

Read more here:: How can i style “echo apply_filters”

Leave a Reply

Your email address will not be published. Required fields are marked *