This topic has 14 replies, 2 voices, and was last updated 8 months, 4 weeks ago ago by Luca Rossi
Like in my previous request I would like to add infos in the product grid on the page with the link in the private area.
Is there a hook for that too? Or how can I do it?
Thanks a lot for your answer
Caroline
Dear Caroline,
We suggest that you consider utilizing the following hooks for your implementation:
– et_after_shop_loop_title
– woocommerce_after_shop_loop_item
We trust that this will be of assistance to you.
Kind regards,
The 8Theme Team
Hi i tried both but it’s not working, obviously I did something wrong again, sorry for that
Hi @Caroline,
Sorry for the confusion!
The correct hooks should be:
add_action('woocommerce_before_shop_loop_item', 'woocommerce_after_shop_loop_item');
function woocommerce_after_shop_loop_item(){
echo'<div class="flex-chiffres chiffres">';
echo '<div class="assis">'.get_field('assis').'<span>assis</span> </div>';
echo '<div class="cocktail">'.get_field('cocktail').'<span>cocktail</span></div>';
echo '<div class="conference">'.get_field('conference').'<span>conference</span> </div>';
echo'</div>';
}
Kind regards,
The 8Theme Team
Thank you and if I want it to appear after the title ?
Hi @Caroline,
So the hook should be:
woocommerce_after_shop_loop_item
Kind regards,
The 8Theme Team
with this code i’ve got the result in the image attached. I would like it to appear after the title
Hi @Caroline,
Sorry for the confusion!
We meant this hook: woocommerce_after_shop_loop_item
Kind regards,
The 8Theme Team
Sorry again, I got nothing with that code
add_action(‘woocommerce_after_shop_loop_item’, ‘woocommerce_after_shop_loop_item’);
function woocommerce_after_shop_loop_item(){
echo’
‘;
echo ‘
‘;
echo ‘
‘;
echo’
‘;
}
Hi @Caroline,
We’ve switched back the custom codes to this:
add_action('woocommerce_before_shop_loop_item', 'woocommerce_after_shop_loop_item');
function woocommerce_after_shop_loop_item(){
echo'<div class="flex-chiffres chiffres">';
echo '<div class="assis">'.get_field('assis').'<span>assis</span> </div>';
echo '<div class="cocktail">'.get_field('cocktail').'<span>cocktail</span></div>';
echo '<div class="conference">'.get_field('conference').'<span>conference</span> </div>';
echo'</div>';
}
And also add this custom CSS under Theme Options > Theme Custom CSS > Global CSS:
.et-advance-product-tabs .content-product {
display: flex;
flex-direction: column;
}
.et-advance-product-tabs .content-product .flex-chiffres.chiffres {
order: 3;
}
Can you please check again?
Kind regards,
The 8Theme Team
Thank you
You’re most welcome!
Kind regards,
The 8Theme Team
Hi I’m sorry but finally I want the infos to display after the image, is that possible?
Hi @Caroline,
With current product structure, please also add this custom CSS:
.infos {
order: 2;
}
Hope it helps!
You must be logged in to reply to this topic.Log in/Sign up