How can i style "echo apply_filters"
With WordPress I have years of experience but with PHP I do not have much experience. I want the available product colors on the shop page and that's working! :)
But i want a text before the available 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
);
}
}
Topic woocommerce-offtopic php filters Wordpress
Category Web