How do I restore my WordPress Admin page?
-
HELP! I started the process of adding a widget area to my WordPress theme, following the tutorial as outlined on Design Chemical’s website, and now my entire admin page is BLANK! Fortunately, I saved a copy of the functions.php file before making changes, and have tried pasting the original code into the file but my admin page is still BLANK.
Blog url: http://swankycooks.com/ -
An added FYI — this is as far as I got in making changes to the functions.php file:
1. Register The Widget
To register the new widget you need to open the functions.php file in your WordPress themes editor.Add the following code to the functions file, making sure you place it in between php tags:
if ( function_exists(‘register_sidebar’) ){
register_sidebar(array(
‘name’ => ‘my_mega_menu’,
‘before_widget’ => ‘<div id=”my-mega-menu-widget”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ”,
‘after_title’ => ”,
));
}
Give the widget area a name – e.g. my_mega_menu and in the before/after options you can place code which you wish to appear wrapped around either the widget itself or the title.Since we are wanting to use one of the menu widget themes, which come with plugins we dont want to wrap it in the standard widget tags, which may interfere with the CSS.
For this example we have just wrapped it in a div tag with the id – my-mega-menu-widget.
2. Add The Widget Code To Your Theme
Now we can add the code that will call the widget to the correct location in our theme files. Since we are creating a horizontal mega menu we obviously want to display this in the header.In your WordPress themes editor open the header.php file.
Find the location where you want to place the menu and add the following code to the header.php file:
-
Okay… I resolved this by renaming the functions.php file “oldfunctions.php” and then uploaded the saved functions.php file to my site via FTP (this file contained the original code, copied before any changes were made). My admin page appears to be functioning properly now.
-
Howdy,
I’m glad to hear you were able to resolve the issue. :-)
Keep in mind that we can only offer support for blogs hosted here at WordPress.com.
Support for self-hosted WordPress.org blogs like the one you mentioned is done at http://wordpress.org/support/
If you have more questions about the free, downloadable, open source WordPress software, please go to http://wordpress.org/support/
If you have questions about how to manage your web server files or database, please contact your web hosting provider directly.
- The topic ‘How do I restore my WordPress Admin page?’ is closed to new replies.