Hi. I’m trying to access the return value of display_sidebar() inside functions.php, but I get a fatal error:
Fatal error: Call to undefined function display_sidebar()
I’ve tried to include both the setup and** wrapper** namespaces in functions, but with no luck.
I’m no PHP master, so learning as I go, and thus I have to ask here since I do not know if it’s “PHP or Sage” related.
My overgoal is to use ACF’s acf/input/admin_head filter to hide some fields in admin on the pages where the sidebar is not displayed.
Any ideas, please?