Created
May 19, 2022 17:16
-
-
Save braddalton/8164ac9f0e2099173f1f2dcb28f9f97a to your computer and use it in GitHub Desktop.
PHP code to add content before your single product on any shop loop archive page type https://wpsites.net/?p=109784
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_action( 'woocommerce_before_shop_loop_item_title', 'hook_before_product', 2 ); | |
function hook_before_product() { | |
echo '<p class="before-product">' . get_post_meta( get_the_ID(), 'before_product', true ) . '</p>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment