Last active
March 17, 2021 12:15
-
-
Save Oscar-Abad-Folgueira/053ffd750a4ecfaf02a70536018b0202 to your computer and use it in GitHub Desktop.
WooCommerce Snippet: Mostrar anuncio en la parte superior de las páginas de producto individual
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 | |
/** | |
* @snippet WooCommerce Snippet: Mostrar anuncio en la parte superior de las páginas de producto individual | |
* @author Oscar Abad Folgueira | |
* @author_url https://www.oscarabadfolgueira.com | |
* @snippet_url https://www.oscarabadfolgueira.com/anadir-contenido-en-la-cabecera-de-los-productos-o-en-productos-en-concreto | |
*/ | |
add_action( 'wp_head', 'oaf_mostrar_anuncio' ); | |
function oaf_mostrar_anuncio() { | |
if ( is_product() ) { | |
echo '<h2 class="anuncio-estrella">ESTE ES NUESTRO PRODUCTO ESTRELLA!!!</h2>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment