Forums

Theme option in Sidebar (or global vars in Sidebar) (2 posts)

  1. painteddigital
    Member
    Posted 2 years ago #

    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?

  2. painteddigital
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic