Hey Paul,
Thanks for the answer and sorry for the late reply.
I’ve tried your code and it does add the text the right place. However I can’t my own custom code to be added the right place.
My code looks like this:
function mycode_display_extra_data_in_loop() {
global $product;
$datafeedr_product = dfrps_product( $product->get_id() );
$datafeedr_product = is_string( $datafeedr_product ) ? [] : $datafeedr_product;
// var_dump( $datafeedr_product ); Uncomment this line to view all fields for this product.
if ( isset( $datafeedr_product['merchant'] ) ) {
echo '<div class="feed-forhandler">' . $datafeedr_product['merchant'] . '</div>';
}
if ( isset( $datafeedr_product['leveringstid'] ) ) {
echo '<div class="feed-leveringstid">Leveringstid: ' . $datafeedr_product['leveringstid'] . '</div>';
}
}
add_action( 'woocommerce_after_shop_loop_item_title', 'mycode_display_extra_data_in_loop', 20 );
It’s basically supposed to pull out data from my WooCommerce products and show them on the archive page. The data is shown but it shows below the products - not below the title.