This file contains 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
.product-page-subtitle { | |
float: right; | |
width: 48%; | |
clear: none; | |
} |
This file contains 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
// Add product subtitle in product pages | |
add_action( 'woocommerce_before_single_product_summary', 'add_product_subtitle_in_product_page', 40 ); | |
function add_product_subtitle_in_product_page() { | |
if (function_exists('the_field')){ | |
if (get_field('subtitulo')){ | |
echo '<span class="product-subtitle">', the_field('subtitulo'), '</span>'; | |
} | |
} | |
} |
This file contains 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
.product-subtitle { | |
color: #666; | |
font-size: 0.8em; | |
} |
This file contains 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
// Add product subtitle in archives | |
add_action( 'woocommerce_after_shop_loop_item_title', 'add_product_subtitle_in_archive', 40 ); | |
function add_product_subtitle_in_archive() { | |
if (function_exists('the_field')){ | |
if (get_field('subtitulo')){ | |
echo '<span class="product-subtitle">', the_field('subtitulo'), '</span>'; | |
} | |
} | |
} |
This file contains 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
// Eliminar product meta de la página de producto en Woocommerce | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); |
This file contains 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 | |
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); | |
function theme_enqueue_styles() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
} | |
/* This snippet removes the action that inserts thumbnails to products in teh loop | |
* and re-adds the function customized with our wrapper in it. | |
* It applies to all archives with products. | |
* |