Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Adding Multiple Custom Fields…

Home / Forums / Virtue Theme / Adding Multiple Custom Fields…

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
September 22, 2015 at 10:02 am

Hannah looking to add three custom fields to product page like so:

add_action( ‘woocommerce_after_single_product_summary’, ‘add_custom_field’, 0 );

function add_custom_field() {
global $post;

echo “<div class=’prod-code’>Brand: “;
echo get_post_meta( $post->ID, ‘Brand’, true );
echo “</div>”;

return true;
}

How can I add all three custom fields set up instead of just one, so it displays:

Brand:
Designer:
Leadtime:

Kind regards,

James

  • The forum ‘Virtue Theme’ is closed to new topics and replies.