WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developing Wordpress themes and I'm having an issue with Theme Options on Wordpress Multisite (WPMS). My theme works like a charm on classic Wordpress (WP) installation but when I try to use it with WPMS it returns a blank page instead of a form with theme's settings.

Here what I use to initiate the theme options page:

function setup_theme_admin_menus() {
    add_theme_page( "Theme Options", "Theme Options", "read", "th_op", "th_op" );
    function th_op() {
        get_template_part("content", "options");
add_action("admin_menu", "setup_theme_admin_menus");

As I mentioned it works as expected on WP but it refuses to render options page on WPMS.

Yes I am aware of http://wpmututorials.com/known-issues/did-your-users-theme-options-and-widgets-page-disappear/ which is practically everywhere and in fact does not solve the problem in a lot of cases. As you can see I use the lowest capability ever which is "read".

Yes I tried to use theme options as SuperAdmin, JustAdmin and any user type that is possible. Nothing helps.

Please help!

share|improve this question
Do you have a function "th_op" or did you mean "theme_options"? – windyjonas Aug 22 '13 at 9:17
My bad! I tried to shrink the code a little bit to make it fit the page with no scroll so it will be visible here ... updated! – LoomyBear Aug 22 '13 at 9:35
I'd strongly advise against nested functions in any PHP code, it's a particularly rank code smell – Tom J Nowell Aug 22 '13 at 9:50
Thanx for this advise @TomJNowell I will re-nest this function. I'm actually not really good with php. But I don't think it causes this problem ... – LoomyBear Aug 22 '13 at 9:53
Imagine someone gives you a list of things to do and item number 5 is actually a small parcel containing a whole new list several feet long, what's what PHP feels like when you nest functions, and it never turns out well – Tom J Nowell Aug 22 '13 at 10:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.