wordpress - Woocommerce custom content-product.php -


this basic code template content-product.php

<li <?php post_class( $classes ); ?>>  <?php do_action( 'woocommerce_before_shop_loop_item' ); ?>  <a href="<?php the_permalink(); ?>">      <h3><?php the_title(); ?></h3>     <?php         /**          * woocommerce_before_shop_loop_item_title hook          *          * @hooked woocommerce_show_product_loop_sale_flash - 10          * @hooked woocommerce_template_loop_product_thumbnail - 10          */         do_action( 'woocommerce_before_shop_loop_item_title' );     ?>       <?php         /**          * woocommerce_after_shop_loop_item_title hook          *          * @hooked woocommerce_template_loop_price - 10          */         do_action( 'woocommerce_after_shop_loop_item_title' );     ?>  </a>  <?php do_action( 'woocommerce_after_shop_loop_item' ); ?> 

the question need show more information every product in main page. here shows title, image, price , add cart button. need able show, short description, attributes, custom fields, etc...

how can accomplish this?

regards.

it looks you'll need add hooks.

here reference on how that: http://codex.wordpress.org/function_reference/add_action

i'd suggest making separate plugin adds hooks either 'woocommerce_after_shop_loop_item_title' or 'woocommerce_before_shop_loop_item_title'.

then inside custom functions, add information need.

or better yet, looking @ source code file, , says can override whole file copying file , placing in theme at: yourtheme/woocommerce/content-product.php

that way can make adjustments straight file.

to add short description, want use the_excerpt() function provided wordpress.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -