Advertisement
Guest User

הגדרת הקישורים הפנימיים (breadcrumbs)

a guest
Aug 15th, 2014
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying product content within loops.
  4. *
  5. * Override this template by copying it to yourtheme/woocommerce/content-product.php
  6. *
  7. * @author WooThemes
  8. * @package WooCommerce/Templates
  9. * @version 1.6.4
  10. */
  11.  
  12. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  13.  
  14. global $product, $woocommerce_loop;
  15.  
  16. // Store loop count we're currently on
  17. if ( empty( $woocommerce_loop['loop'] ) )
  18. $woocommerce_loop['loop'] = 0;
  19.  
  20. // Store column count for displaying the grid
  21. if ( empty( $woocommerce_loop['columns'] ) )
  22. $woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 4 );
  23.  
  24. // Ensure visibility
  25. if ( ! $product || ! $product->is_visible() )
  26. return;
  27.  
  28. // Increase loop count
  29. $woocommerce_loop['loop']++;
  30.  
  31. // Extra post classes
  32. $classes = array();
  33. if ( 0 == ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] || 1 == $woocommerce_loop['columns'] )
  34. $classes[] = 'first';
  35. if ( 0 == $woocommerce_loop['loop'] % $woocommerce_loop['columns'] )
  36. $classes[] = 'last';
  37. ?>
  38. <li <?php post_class( $classes ); ?>>
  39.  
  40. <?php do_action( 'woocommerce_before_shop_loop_item' ); ?>
  41.  
  42. <a href="<?php the_permalink(); ?>">
  43.  
  44. <?php
  45. /**
  46. * woocommerce_before_shop_loop_item_title hook
  47. *
  48. * @hooked woocommerce_show_product_loop_sale_flash - 10
  49. * @hooked woocommerce_template_loop_product_thumbnail - 10
  50. */
  51. do_action( 'woocommerce_before_shop_loop_item_title' );
  52. ?>
  53.  
  54. <h3><?php the_title(); ?></h3>
  55.  
  56. <?php
  57. /**
  58. * woocommerce_after_shop_loop_item_title hook
  59. *
  60. * @hooked woocommerce_template_loop_rating - 5
  61. * @hooked woocommerce_template_loop_price - 10
  62. */
  63. do_action( 'woocommerce_after_shop_loop_item_title' );
  64. ?>
  65.  
  66. </a>
  67.  
  68. <?php do_action( 'woocommerce_after_shop_loop_item' ); ?>
  69.  
  70. </li>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement