1

I have a WooCommerce shop page displaying a series of books.

enter image description here

I'd like to add a line of text between the thumbnail and its corresponding 'View' button.

I thought this would do the trick:

add_action( 'woocommerce_after_shop_loop_item', 'eyates_show_pub_date', 5 );

function eyates_show_pub_date() {
   echo '<p class="shop-badge">Publication Date:</p>';
} 

Instead, it displays the the text below the 'View' button. I can't seem to find any other hooks that would be appropriate; nor can I find a template to add that to.

If anyone could shed some light on the matter for me, I'd be most appreciative.

  • What happen if you use woocommerce_after_shop_loop_item_title? – Castiblanco May 22 at 2:22
  • oddly enough, it still shows up under the CTA button – Daveh0 May 22 at 2:26
  • You should better contact the theme author through its support threads, as nobody can realy guess and answer on something that is already customized by your theme or a plugin. – LoicTheAztec May 22 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.