Skip to content

Instantly share code, notes, and snippets.

@coenjacobs
Created May 4, 2012 14:05
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save coenjacobs/2594985 to your computer and use it in GitHub Desktop.
Save coenjacobs/2594985 to your computer and use it in GitHub Desktop.
Display WooCommerce product attribute archive links on product page, right below the add to cart button.
@maturinpt
Copy link

Hi,

I confirm, the code works with pa in the prefix of the attributes.
But
How to display on one single line one attribute and then a second line a second attribute
(with the automatic loop)

@speedwheel
Copy link

Hello, this works just fine, but after I click the attribute it shows a white page. I did this stuff here http://wcdocs.woothemes.com/codex/extending/using-custom-attributes-in-menus/ but still not working.

@Valdimarsson
Copy link

Hi, this is a nifty little "plugin" and it's working flawlessly.

I'm trying to remove the attribute name from the add_action but I've tried everything and it gives me all kinds of different errors. Are there a easy way to change this. Ex.: Buttonsize 3/4 should become Button is 3/4. I would still like the slug to be buttonsize.

Thanks in advance and if this isn't possible it's still a rather nice piece of code :-D

Best regards
Valdimarsson

@mew4mikkel
Copy link

Well, having not to much PHP-experiance, I would like to know where to put this plugin? Functions.php? A .php-file for by itself? Or where?

I am trying to put an attribute with the property fx: Condition: Used, right next to the SKU in the product_meta div..

Help would be greatfully appreciated!

@jhinden
Copy link

jhinden commented Jun 28, 2014

I can't get this to work. If my attribute name is 'format', I put pa_format (format being the name of the attribute) and they don't show up. Should it be '<pa_format>' or 'pa_format' or pa_format? Neither seem to work. Thanks!

@dfmpmag
Copy link

dfmpmag commented Apr 12, 2017

Hello,
From last update of Woocommerce I have label "Product" in front of every attribute name. Please how could I remove it?
Thanks

@seldimi
Copy link

seldimi commented Aug 23, 2017

Change hook
add_action( 'woocommerce_shop_loop_item_title', 'cj_show_attribute_links' );

@MVMORADIA
Copy link

I want to add Link in attributes Value and want to display Link in attributes Value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment