WordPress.org

Support

Support » Multisite » [Resolved] WordPress Admin Bar is not working with my custom theme?

[Resolved] WordPress Admin Bar is not working with my custom theme?

  • Background:
    I’m developing my own theme for one website that is operating on WordPress Network (WordPress Mu) and I had no problem with the past upgrades. After upgrading to WordPress 3.1 and using the Network Admin. I wasn’t able to access to the Network Admin with my custom theme. However, when I switch the theme back to Twenty Ten, it works fine? What should I do?

    Error

    Fatal error: Call to undefined function add_contextual_help() in XXXXXXXXXXXXXXXX/wp-admin/network/settings.php on line 22

    Code

    $title = __( 'Settings' );
    $parent_file = 'settings.php';
    
    // Line 22 start here
    add_contextual_help($current_screen,
    	'<p>' . __('This screen sets and changes options for the network as a whole. The first site is the main site in the network and network options are pulled from that original site’s options.') . '</p>' .
    	'<p>' . __('Operational settings has fields for the network’s name and admin email.') . '</p>' .
    	'<p>' . __('Dashboard Site is an option to give a site to users who do not have a site on the system. Their default role is Subscriber, but that default can be changed. The Admin Notice Feed can provide a notice on all dashboards of the latest post via RSS or Atom, or provide no such notice if left blank.') . '</p>' .
    	'<p>' . __('Registration settings can disable/enable public signups. If you let others sign up for a site, install spam plugins. Spaces, not commas, should separate names banned as sites for this network.') . '</p>' .
    	'<p>' . __('New site settings are defaults applied when a new site is created in the network. These include welcome email for when a new site or user account is registered, and what᾿s put in the first post, page, comment, comment author, and comment URL.') . '</p>' .
    	'<p>' . __('Upload settings control the size of the uploaded files and the amount of available upload space for each site. You can change the default value for specific sites when you edit a particular site. Allowed file types are also listed (space separated only).') . '</p>' .
    	'<p>' . __('Checkboxes for media upload buttons set which are shown in the visual editor. If unchecked, a generic upload button is still visible; other media types can still be uploaded if on the allowed file types list.') . '</p>' .
    	'<p>' . __('Menu setting enables/disables the plugin menus from appearing for non super admins, so that only super admins, not site admins, have access to activate plugins.') . '</p>' .
    	'<p>' . __('Super admins can no longer be added on the Options screen. You must now go to the list of existing users on Super Admin > Users and click on Username or the Edit action link below that name. This goes to an Edit User page where you can check a box to grant super admin privileges.') . '</p>' .
    	'<p><strong>' . __('For more information:') . '</strong></p>' .
    	'<p>' . __('<a href="http://codex.wordpress.org/Network_Admin_Settings_Screen" target="_blank">Documentation on Network Settings</a>') . '</p>' .
    	'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    );

    I do have “setting.php” in my theme folder as part of the theme options.

    Any help would be great! Thank you in advance.

Viewing 15 replies - 1 through 15 (of 32 total)
  • Update:
    I just move all the scripts from setting.php in my theme folder and move it over to functions.php. That took away the fatal error away.

    Now I can’t see the WP Admin bar when I’m viewing my site. Any suggestion? All I see is a black gaps. I can see it from the admin site but not when I’m viewing my site as part of the 3.1 new feature.

    Thanks in advance.

    Yessss, I have got like this problem alsoooo…

    Please help us !!!

    Thanks,

    I have got like this problem tooo…

    Please help us !!!

    Thanks,

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    I can’t see any reason why that would bork anything….

    Can anyone post *any* kind of details or even a link to their site?

    this is my site
    http://sham-soft.com

    plugin in used
    FireStats 1.6.7-stable

    that is all

    This may be too obvious, but I found that I’d failed to call wp_footer() just before the closing body tag in some of my themes. Once I put that in place, the admin bar appeared.

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Yep.

    Check your theme’s footer.php file. Does it have a call to wp_footer() ?

    If not, stuff it in there.

    Andrea_r
    my problem not in the admin bar. it is in admin area
    i can’t login in to Network Admin link.

    the following message is appear
    ==============================
    Fatal error: Call to undefined function add_contextual_help() in /home/xxxxxxx/public_html/wp-admin/network/settings.php on line 22
    ==============================

    what is the problem ?

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    Disable your plugins by renaming the plugins folder via ftp.

    then go to http://sham-soft.com/wp-admin/network/

    if you still can;t get in, LOOK at the files on the server/ Go to the wp-admin/network folder. Are there actual files there?

    “Call to undefined function” always means the same thing: incomplete upgrade.

    Do a Manual Upgrade instead:
    http://codex.wordpress.org/Updating_WordPress#Manual_Update

    Andrea_r & Otto

    i have disabled all plugins and uploaded a fresh wordpress copy but the problem is still

    any idea?

    Hi Ferasof,
    Right now, I downgrade my site to wordpress-3.0.5…

    http://wordpress.org/wordpress-3.0.5.zip

    First, I upload upload directory “wp-admin” & “wp-include”..

    Don’t forget to backup your both directories first..

    Second, I upload my old “wp-settings.php” it is a file that I backuped before I upgrade to wordpress-3.1.

    So.. Good luck ^_^

    Yeah, don’t do that.

    The DATABASE was upgrade, and is kinda not so much compatible with 3.0.5 so you will have issues down the line. Don’t downgrade, please. You’ll get hurt.

    Did you try using the default theme?

    My site was downgraded already..
    Everything is OK..

    For my site, the multi-site is very importance .. I cannot wait ..

    So.. whatever do you want to do.. Backup first!!

    .. ei ei .. ^_^

    aoddy – Just be aware, if things get really broken later, this will probably be why. It’s NOT something I recommend people do off the major releases.

    Yes, always backup first 🙂

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘[Resolved] WordPress Admin Bar is not working with my custom theme?’ is closed to new replies.
Skip to toolbar