Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

[Resolved] Woocommerce Display Custom fields

Home Forums Support [Resolved] Woocommerce Display Custom fields

Home Forums Support Woocommerce Display Custom fields

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1007587
    Cheryl

    Hi GP

    I would like to display some custom fields I’ve created, in woocommerce products (via ACF), underneath the description, it’s three fields: event_date | start_time | finish_time, can some point me in the right direction, please. Is this something that could be achieved with hooks?

    Regards

    Nigel and Cheryl

    #1007591
    David
    Staff
    Customer Support

    Hi there,

    yes, Hooks is the way to go, you can see all of the available hooks here for the Woo single product page:

    https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/

    That site also has visual hooks for archives etc.

    You will find most of them in the Hooks List in the Hook Element.

    Then its just a case of using ACF to display those custom fields using the_field() function:

    https://www.advancedcustomfields.com/resources/displaying-custom-field-values-in-your-theme/

    #1007972
    Cheryl

    Hi David

    Holy cr*p, you answered that in just under 5 minutes, I cannot believe how easy that was, display custom field(s) in WooCommerce via Elements>Hooks in under a minute – Genius πŸ™‚ and this showed where to put it WooCommerce Visual Hook Guide: Single Product Page

    #1008087
    David
    Staff
    Customer Support

    Haha awesome – glad to be of help πŸ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.