This topic has 2 replies, 2 voices, and was last updated 1 months ago ago by Luca Rossi
Hello,
I would like to add a ACF Field for the Date like this on the archive products page. The ACF field is already on the page product. How can I add this on the archive ?
Hi @Mario,
Please try adding this custom codes under functions.php file locates in your child theme:
function woocommerce_template_loop_product_title() {
echo '<h2 class="' . esc_attr( apply_filters( 'woocommerce_product_loop_title_classes', 'woocommerce-loop-product__title' ) ) . '">' . get_the_title() . '</h2>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
the_field('your_field_name');
}
The custom field will display under your product titles.
Hope it helps!
You must be logged in to reply to this topic.Log in/Sign up