Skip to content
Advertisement

Add php code after product price on shop and archive pages [closed]

Link attached image

I am trying to add code php after price (not on single product pages) but on sshop pages and archive page (As image).

The php code I want to insert is:

<?php the_author_meta( 'phone' ); ?>

Looking forward to the help of experts. Sincerely thank !

Advertisement

Answer

Try this added to your functions.php:

Modify to your needs.

function woocommerce_after_cat_price() {
    echo the_author_meta( 'phone' );
}
add_action('woocommerce_after_shop_loop_item', 'woocommerce_after_cat_price', 10, 0);
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement