Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. <?php
  2. /**
  3. * Single Product Price, including microdata for SEO
  4. *
  5. * @author WooThemes
  6. * @package WooCommerce/Templates
  7. * @version 1.6.4
  8. */
  9.  
  10. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  11.  
  12. global $post, $product;
  13. ?>
  14. <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
  15.  
  16. <p class="price"><?php echo $product->get_price_html(); ?></p>
  17.  
  18. <meta itemprop="price" content="<?php echo $product->get_price(); ?>" />
  19. <meta itemprop="priceCurrency" content="<?php echo get_woocommerce_currency(); ?>" />
  20. <link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" />
  21.  
  22. </div>
  23.  
  24. <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
  25.  
  26. <p class="price"><span class="amount">&#36;1.60</span>&ndash;<span class="amount">&#36;25.00</span></p>
  27.  
  28. <meta itemprop="price" content="1.6" />
  29. <meta itemprop="priceCurrency" content="USD" />
  30. <link itemprop="availability" href="http://schema.org/InStock" />
  31.  
  32. </div>
  33.  
  34. <?php
  35. /**
  36. * Single Product Price, including microdata for SEO
  37. *
  38. */
  39.  
  40. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  41.  
  42. global $post, $product;
  43. ?>
  44. <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
  45.  
  46. <?php if (is_product() and $post->post_name == 'club-high-fear'): ?>
  47.  
  48. <p class="price"> <?php echo $product->get_price_html(); ?> per month</p>
  49.  
  50. <?php elseif (is_product() and $post->post_name == 'club-medium-fear'): ?>
  51.  
  52. <p class="price"> <?php echo $product->get_price_html(); ?> per month</p>
  53.  
  54. <?php elseif (is_product() and $post->post_name == 'club-low-fear'): ?>
  55.  
  56. <p class="price"> <?php echo $product->get_price_html(); ?> per month</p>
  57.  
  58. <?php elseif (is_product() and $post->post_name == 'self-study-online-course'): ?>
  59.  
  60. <p class="price"> <?php echo $product->get_price_html(); ?> per course</p>
  61.  
  62. <?php elseif (is_product() and $post->post_name == '10-week-workshop'): ?>
  63.  
  64. <p class="price"> <?php echo $product->get_price_html(); ?> per workshop</p>
  65.  
  66. <?php elseif (is_product() and $post->post_name == 'coaching'): ?>
  67.  
  68. <p class="price"> <?php echo $product->get_price_html(); ?> per minute or $25 per email</p>
  69.  
  70. <?php else: ?>
  71. <p class="price"> <?php echo $product->get_price_html(); ?></p>
  72. <?php endif; ?>
  73.  
  74. <meta itemprop="price" content="<?php echo $product->get_price(); ?>" />
  75. <meta itemprop="priceCurrency" content="<?php echo get_woocommerce_currency(); ?>" />
  76. <link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" />
  77.  
  78. </div>
  79.  
  80. <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
  81.  
  82. <p class="price"><span class="amount">&#36;1.60</span>&ndash;<span class="amount">&#36;25.00</span></p>
  83. <p class="price"><span class="amount">&#36;1.60</span>&ndash;<span class="amount">&#36;25.00</span> per minute or $25 per email</span>
  84.  
  85.  
  86. <meta itemprop="price" content="1.6" />
  87. <meta itemprop="priceCurrency" content="USD" />
  88. <link itemprop="availability" href="http://schema.org/InStock" />
  89.  
  90. </div>
  91.  
  92. <?php if (is_product() and $post->post_name == 'club-high-fear'): ?>
  93.  
  94. <?php if (is_product() && $post->post_name == 'club-high-fear'): ?>
  95.  
  96. <?php if (is_product() and $post->post_name == 'club-high-fear') { ?>
  97.  
  98. <p class="price"> <?php echo $product->get_price_html(); ?> per month</p>
  99.  
  100. <?php } ....?>
  101.  
  102. <?php if (is_product() && $post->post_name == 'club-high-fear' || $post->post_name == 'club-medium-fear' || $post->post_name == 'club-low-fear'){ ?>
  103.  
  104. <p class="price"> <?php echo $product->get_price_html(); ?> per month</p>
  105.  
  106. <?php } elseif (is_product() && $post->post_name == 'self-study-online-course'){ ?>
  107.  
  108. <p class="price"> <?php echo $product->get_price_html(); ?> per course</p>
  109.  
  110. <?php } elseif (is_product() && $post->post_name == '10-week-workshop'){ ?>
  111.  
  112. <p class="price"> <?php echo $product->get_price_html(); ?> per workshop</p>
  113.  
  114. <?php } elseif (is_product() && $post->post_name == 'coaching') { ?>
  115.  
  116. <p class="price"> <?php echo $product->get_price_html(); ?> per minute or $25 per email</p>
  117.  
  118. <?php } else { ?>
  119. <p class="price"> <?php echo $product->get_price_html(); ?></p>
  120. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement