Skip to content

Instantly share code, notes, and snippets.

@braddalton
Created May 19, 2022 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/ad625ddf24bd36b7e28b45a9789fd4a2 to your computer and use it in GitHub Desktop.
Save braddalton/ad625ddf24bd36b7e28b45a9789fd4a2 to your computer and use it in GitHub Desktop.
Use this code to add content after your single product on any shop loop archive page type. https://wpsites.net/?p=109784
add_action( 'woocommerce_after_shop_loop_item_title', 'hook_after_product', 2 );
function hook_after_product() {
echo '<p class="after-product">' . get_post_meta( get_the_ID(), 'after_product', true ) . '</p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment