Support » Plugins and Hacks » WooCommerce » Add links to Product Attributes

Add links to Product Attributes

  • 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://codex.wordpress.org/Forum_Welcome#No_Bumping ]

  • The topic ‘Add links to Product Attributes’ is closed to new replies.
Skip to toolbar