Home Forums General Issues ACF Field in functions.php


ACF Field in functions.php

  • How to use ACF Field in Functions.php in the theme?

    When I install the theme then I see an error on the screen.

    call to undefine function get_field()

    Please tell me how can I solve this error. 🤷‍♂️🤷‍♂️🤷‍♂️

  • Do you have ACF or ACF Pro installed?

  • No. IF I install the theme then I see this error.

    I solve this error using this code

    // code

    Thanks for replying me 😊😊

  • yes its because you need to install ACF in order to use the function get_field()
    i would recommend doing it because i think your theme depends on it

  • Yes, my theme depends on ACF. I also have added ACF Plugin to theme plugins.
    When the user installs my theme he gets notification for Required Plugins.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.