Created
December 18, 2012 23:19
-
-
Save claudiosanches/4333017 to your computer and use it in GitHub Desktop.
WooCommerce - Ocultar o preço para produtos com variáveis.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Single Product Price, including microdata for SEO | |
* | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 1.6.4 | |
*/ | |
global $post, $product; | |
?> | |
<?php if ( $product->product_type != 'variable' ) : ?> | |
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> | |
<p itemprop="price" class="price"><?php echo $product->get_price_html(); ?></p> | |
<link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" /> | |
</div> | |
<?php endif; ?> |
uso esse código em functions.php ?
uso esse código em functions.php ?
Não, usa no arquivo responsavel pelo loop das postagens wordpress.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Top, fiz uma adição a um plugin que criei usando isso, valeu.