Title: Widget &#8211; Function.php mistake. how to fix. Please help!
Last modified: August 21, 2016

---

# Widget – Function.php mistake. how to fix. Please help!

 *  [ralph88](https://wordpress.org/support/users/ralph88/)
 * (@ralph88)
 * [12 years ago](https://wordpress.org/support/topic/widget-functionphp-mistake-how-to-fix-please-help/)
 * Hi,
 * I hope somebody can help. I put this code into functions.php to create new widgets.
   I made a mistake by putting the semicolon after the closing bracket in line 1.
   However didn’t notice until wordpress crashed. I tried removing the semicolon
   but it didn’t bring back the site. I also tested the same piece of code on another
   wordpress installation and was able to crash and recover wordpress after putting
   in and deleting the semicolon (on a different theme).
 * By running this code have I created something somewhere else that is now the 
   problem? I have tried removing the whole theme and this did solve the problem
   however I need to use the theme as I’ve built it from scratch.
 * Can anybody help?
 * Many thanks
 * Ralph
 *     ```
       function create_widget( $name, $id, $description ); {
       	$args = array(
       		'name'          => __( $name ),
       		'id'            => $id,
       		'description'   => $description,
       		'before_widget' => '',
       		'after_widget'  => '',
       		'before_title'  => '<h5>',
       		'after_title'   => '</h5>'
       	);
   
       	register_sidebar( $args );
       }
   
       create_widget( 'Left Footer', 'footer_left', 'Displays in the bottom left of footer' );
       create_widget('Middle Footer', 'footer_middle', 'Displays in the middle of footer');
       create_widget('Right Footer', 'footer_right', 'Displays in the bottom right of footer');
       ```
   

The topic ‘Widget – Function.php mistake. how to fix. Please help!’ is closed to
new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * 0 replies
 * 1 participant
 * Last reply from: [ralph88](https://wordpress.org/support/users/ralph88/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/widget-functionphp-mistake-how-to-fix-please-help/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
