• I am building a custom theme and I have tried a few tutorials on Custom theme options. When I use the option in index.php, it works, but when I move it to the sidebar, WP_Debug says it’s an “undefined variable” despite the fact that it’s declared in header.php as global.

    It’s as if the sidebar.php can’t access the global variables, but it can call WP functions like “wp_list_bookmarks();” with no problem.

    What am I missing?

Viewing 1 replies (of 1 total)
  • Thread Starter painteddigital

    (@painteddigital)

    I still haven’t figured it out. I thought maybe moving the global declaration out of the head would help, but no dice. :/

Viewing 1 replies (of 1 total)
  • The topic ‘Theme option in Sidebar (or global vars in Sidebar)’ is closed to new replies.