Title: specific product attribute display
Last modified: August 31, 2016

---

# specific product attribute display

 *  Resolved [leks29](https://wordpress.org/support/users/leks29/)
 * (@leks29)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/)
 * i would like to be able to show only some product attributes in the short product
   description and in the additional information tab show all the product attributes
   checked for display… how can i achieve this…?
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/specific-product-attribute-display/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/specific-product-attribute-display/page/2/?output_format=md)

 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302567)
 * See [https://docs.woothemes.com/document/template-structure/](https://docs.woothemes.com/document/template-structure/)
 * Could add content in [https://github.com/woothemes/woocommerce/blob/master/templates/single-product/short-description.php](https://github.com/woothemes/woocommerce/blob/master/templates/single-product/short-description.php)
 *  Thread Starter [leks29](https://wordpress.org/support/users/leks29/)
 * (@leks29)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302648)
 * I’ll check ’em out and give you some details later on today
 *  Thread Starter [leks29](https://wordpress.org/support/users/leks29/)
 * (@leks29)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302649)
 * I’ve checked those links, i’ve already created the template files and folders
   whitin my theme, i’ve also looked for a plugin of some sort to display specific
   product attributes in short description but they show all of the products attributes
   selected, which is fine for the additional information tab, but i just need a
   couple of them in the short description…
 * i’ve read this link [https://wordpress.org/support/topic/display-custom-attributes-on-description-tab-of-single-product-page?replies=11](https://wordpress.org/support/topic/display-custom-attributes-on-description-tab-of-single-product-page?replies=11)
   but i really cant make it work…
 * any extra information would be really apreciated
 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302666)
 * So you know you can get all attributes with `$attributes = $product->get_attributes();`?
   The one you want will be in there.
 * If you want to see what is in that array of attributes, you can var dump it. `
   var_dump( $attributes );` See whats inside and hopefully you can work with that
   array.
 *  Thread Starter [leks29](https://wordpress.org/support/users/leks29/)
 * (@leks29)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302694)
 * i’m not that great with php, or programming for that matter, but i would love
   some more help, is there a way to make that work in the short description?
 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302707)
 * It would work in the short description template file, because it’s PHP code.
 * Some code examples:
 * [http://stackoverflow.com/questions/13374883/woocommerce-getting-custom-attributes](http://stackoverflow.com/questions/13374883/woocommerce-getting-custom-attributes)
   
   [http://isabelcastillo.com/woocommerce-product-attributes-functions](http://isabelcastillo.com/woocommerce-product-attributes-functions)
   for global attributes: [http://sarathlal.com/get-values-of-product-custom-attribute-woocommerce/](http://sarathlal.com/get-values-of-product-custom-attribute-woocommerce/)
 *  [murrayac](https://wordpress.org/support/users/jumpmuz/)
 * (@jumpmuz)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302781)
 * And the plugin [https://wordpress.org/plugins/woocommerce-show-attributes/](https://wordpress.org/plugins/woocommerce-show-attributes/)
 *  Thread Starter [leks29](https://wordpress.org/support/users/leks29/)
 * (@leks29)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302812)
 * ive tried this code:
 *     ```
       <?php
       /**
        * Single product short description
        *
        * This template can be overridden by copying it to yourtheme/woocommerce/single-product/short-description.php.
        *
        * HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer).
        * will need to copy the new files to your theme to maintain compatibility. We try to do this.
        * as little as possible, but it does happen. When this occurs the version of the template file will.
        * be bumped and the readme will list any important changes.
        *
        * @see 	    http://docs.woothemes.com/document/template-structure/
        * @author 		WooThemes
        * @package 	WooCommerce/Templates
        * @version     1.6.4
        */
   
       if ( ! defined( 'ABSPATH' ) ) {
       	exit; // Exit if accessed directly
       }
   
       global $post;
   
       if ( ! $post->post_excerpt ) {
       	return;
       }
   
       ?>
       <div itemprop="description">
   
       <?php
       if (is_user_logged_in()) {
           $product->list_attributes();
       } else {
   
       $estado_values = get_the_terms( $product->id, 'pa_estado');
   
       foreach ( $estado_values as $estado_value ) {
       	  echo $estado_value->name;
       }
   
       $municipio_values = get_the_terms( $product->id, 'pa_municipio');
   
       foreach ( $municipio_values as $municipio_value ) {
       	  echo $municipio_value->name;
       }
   
       $afluencia_apriximda_values = get_the_terms( $product->id, 'pa_afluencia_apriximda');
   
       foreach ( $afluencia_apriximda_values as $afluencia_apriximda_value ) {
       	  echo $afluencia_apriximda_value->name;
       }
   
       $afluencia_aproximada_values = get_the_terms( $product->id, 'pa_afluencia_aproximada');
   
       foreach ( $afluencia_aproximada_values as $afluencia_aproximada_value ) {
       	  echo $afluencia_aproximada_value->name;
       }
   
       $tipo_de_estructura_values = get_the_terms( $product->id, 'pa_tipo_de_estructura');
   
       foreach ( $tipo_de_estructura_values as $tipo_de_estructura_value ) {
       	  echo $tipo_de_estructura_value->name;
       }
   
       $medida_pantalla_values = get_the_terms( $product->id, 'pa_medida_pantalla');
   
       foreach ( $medida_pantalla_values as $medida_pantalla_value ) {
       	  echo $medida_pantalla_value->name;
       }
   
       $resolucion_values = get_the_terms( $product->id, 'pa_resolucion');
   
       foreach ( $resolucion_values as $resolucion_value ) {
       	  echo $resolucion_value->name;
       }
   
       $pitch_values = get_the_terms( $product->id, 'pa_pitch');
   
       foreach ( $pitch_values as $pitch_value ) {
       	  echo $pitch_value->name;
       }
   
       $vista_values = get_the_terms( $product->id, 'pa_vista');
   
       foreach ( $vista_values as $vista_value ) {
       	  echo $vista_value->name;
       }
   
       }
       ?>
   
       	<?php echo apply_filters( 'woocommerce_short_description', $post->post_excerpt ) ?>
   
       </div><code></code>
       ```
   
 * but i get no error simply a login screen… whats wrong…
 *  Thread Starter [leks29](https://wordpress.org/support/users/leks29/)
 * (@leks29)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302813)
 * in some products simply doesnt anything in the description… please help!
 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302815)
 * > in some products simply doesnt anything in the description… please help!
 * What do you mean? And are you aware your code is running for logged in users 
   only?
 *  Thread Starter [leks29](https://wordpress.org/support/users/leks29/)
 * (@leks29)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302822)
 * i meant that for some products simply doesnt show anything, i want it to show
   the full list of attributes to logged in users, or else show only a few specific
   attributes
 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302823)
 * Your code has a section for logged in users and logged out., so I don’t know 
   what part you’re stuck with.
 * If you need help, perhaps consider jobs.wordpress.net and have it built for you.
 *  Thread Starter [leks29](https://wordpress.org/support/users/leks29/)
 * (@leks29)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302825)
 * thanks so much for the help, i’ll try have someone else have it built for me,
   and if everything else fails i would change from woocommerce to another pluggin.
 *  Thread Starter [leks29](https://wordpress.org/support/users/leks29/)
 * (@leks29)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302826)
 * thanks so much for the help, i’ll try have someone else have it built for me,
   and if everything else fails i would change from woocommerce to another pluggin.
 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [10 years ago](https://wordpress.org/support/topic/specific-product-attribute-display/#post-7302827)
 * Let us know how it goes.

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/specific-product-attribute-display/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/specific-product-attribute-display/page/2/?output_format=md)

The topic ‘specific product attribute display’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [Product Attributes](https://wordpress.org/support/topic-tag/product-attributes/)

 * 19 replies
 * 6 participants
 * Last reply from: [Ajay Ghaghretiya](https://wordpress.org/support/users/ajay188843/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/specific-product-attribute-display/page/2/#post-8942643)
 * Status: resolved