Skip to content

WooCommerce Archive hook color and size #767

Answered by crftwrk
darkfrizzi asked this question in Q&A
Discussion options

You must be logged in to vote

This is done by hook woocommerce_after_shop_loop_item_title. Basic usage:

// Function for woocommerce_shop_loop_item_title action-hook.
function bootscore_woocommerce_shop_loop_item_after_title_action(){

  echo '<p>Do something here</p>';
}
add_action( 'woocommerce_after_shop_loop_item_title', 'bootscore_woocommerce_shop_loop_item_after_title_action' );

On bootscore.me it is a bit modified to catch product(s) by id:

// Function for `woocommerce_after_shop_loop_item_title` action-hook.
function bootscore_woocommerce_shop_loop_item_after_title_action() {
  global $product;

  $target_ids = array(23262, 23285, 23333); // Add as many IDs as you need here

  if (in_array($product->get_id(), $t…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by darkfrizzi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants