Quantcast
Channel: WordPress.org Forums » [WooCommerce] Support
Viewing all articles
Browse latest Browse all 104029

mattmatt88 on "[Plugin: WooCommerce - excelling eCommerce] Add links to Product Attributes"

$
0
0

Hello,

I want to add Links to product attributes (at the bottom of product-attributes.php). So I have to change this line of code, but I don't know how:

echo apply_filters( 'woocommerce_attribute', wpautop( wptexturize( implode( ', ', $values ) ) ), $attribute, $values );

Every Value should have a link in a glossar, for example the value "Game" should have a link like "http://xxx.com/glossar#game". So I changed it to this:

echo apply_filters( 'woocommerce_attribute', wpautop( wptexturize( '<a href="http://xxx.com/glossar#game">'.implode( '</a>, <a href="http://xxx.com/glossar#game">', $values ).'</a>' ) ), $attribute, $values );

How can I change it so that the word "game" in the link is always the actual attribute? It doesn't work with something like $values or $values[0]

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


Viewing all articles
Browse latest Browse all 104029

Trending Articles