Title: Error in functions.php. Please help!!
Last modified: August 20, 2016

---

# Error in functions.php. Please help!!

 *  Resolved [spandabel](https://wordpress.org/support/users/spandabel/)
 * (@spandabel)
 * [14 years ago](https://wordpress.org/support/topic/error-in-functionsphp-please-help/)
 * Hi!
 * Suddenly I got the message:
 * **Parse error: syntax error, unexpected T_CLASS in /home/spandabe/public_html/
   wp-content/themes/modularity-lite/functions.php on line 72**
 * when opening my site [http://www.spandabel.dk](https://wordpress.org/support/topic/error-in-functionsphp-please-help/www.spandabel.dk?output_format=md)
 * I only changed things in header.php, not in functions.php!
 * This is how it looks in my functions.php around line 72:
 *     ```
       // The header business begins here:
   
       // No CSS, just IMG call
       define('HEADER_TEXTCOLOR', '');
       define('HEADER_IMAGE', '');
       define('HEADER_IMAGE_WIDTH', 950);
       define('HEADER_IMAGE_HEIGHT', 250);
       define( 'NO_HEADER_TEXT', true );
   
       function modularity_admin_header_style() {
       ?>
       <style type="text/css">
       #headimg {
       	height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
       	width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
       }
       ```
   
 * Does anybody have an idea what has happened??
    Thanks. – Anne
 * btw – the theme I’m using is Modularity Lite

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Ross Hanney](https://wordpress.org/support/users/rosshanney/)
 * (@rosshanney)
 * [14 years ago](https://wordpress.org/support/topic/error-in-functionsphp-please-help/#post-2731709)
 * Hello,
 * Could you post all the code from your `functions.php` and `header.php` files?(
   Use [pastebin](http://pastebin.com/), or similar).
 * Ross
 *  Thread Starter [spandabel](https://wordpress.org/support/users/spandabel/)
 * (@spandabel)
 * [14 years ago](https://wordpress.org/support/topic/error-in-functionsphp-please-help/#post-2731730)
 * Thanks for responding.
    I’ve never used pastebin, but here’s a link to the functions.
   php [http://pastebin.com/t167ju6M](http://pastebin.com/t167ju6M)
 * I cannot get to the header.php. In fact I’m “locked” in the functions.php, everytime
   I update I get the error, and the only thing I can do then is to go back in my
   browser to the functions.php
 *  [Abdul Awal Uzzal](https://wordpress.org/support/users/mamb2b/)
 * (@mamb2b)
 * [14 years ago](https://wordpress.org/support/topic/error-in-functionsphp-please-help/#post-2731734)
 * Hello,
    You may access to your header.php using ftp & modify the file .
 *  [Ross Hanney](https://wordpress.org/support/users/rosshanney/)
 * (@rosshanney)
 * [14 years ago](https://wordpress.org/support/topic/error-in-functionsphp-please-help/#post-2731746)
 * There doesn’t appear to an error in that code.
 * As Abdul suggests, you should be able to access the `functions.php` and `header.
   php` files via FTP, or by using the file manager in your hosting control panel.
 *  Thread Starter [spandabel](https://wordpress.org/support/users/spandabel/)
 * (@spandabel)
 * [14 years ago](https://wordpress.org/support/topic/error-in-functionsphp-please-help/#post-2731752)
 * So I managed to find my header.php using filezilla.
    here it is:
 * [http://pastebin.com/KsqbD6UM](http://pastebin.com/KsqbD6UM)
 *  [Ross Hanney](https://wordpress.org/support/users/rosshanney/)
 * (@rosshanney)
 * [14 years ago](https://wordpress.org/support/topic/error-in-functionsphp-please-help/#post-2731754)
 * Could you post the code from `functions.php` accessed via FileZilla?
 *  Thread Starter [spandabel](https://wordpress.org/support/users/spandabel/)
 * (@spandabel)
 * [14 years ago](https://wordpress.org/support/topic/error-in-functionsphp-please-help/#post-2731756)
 * Sure! Here it is:
 * [http://pastebin.com/wDbHtU5f](http://pastebin.com/wDbHtU5f)
 *  [Ross Hanney](https://wordpress.org/support/users/rosshanney/)
 * (@rosshanney)
 * [14 years ago](https://wordpress.org/support/topic/error-in-functionsphp-please-help/#post-2731758)
 * There are several errors in the `include_search_box` function in your `functions.
   php` file. That function should probably be as follows:
 *     ```
       function include_search_box( $items, $args ) {
       	// only display search box on our primary menu
       	if( 'primary' === $args->theme_location )
       		$items .= '<li class="menu-item menu-item-search">' . get_search_form( false ) . '</li>';
   
       	return $items;
       }
   
       add_filter( 'wp_nav_menu_items', 'include_search_box', 10, 2 );
       ```
   
 *  Thread Starter [spandabel](https://wordpress.org/support/users/spandabel/)
 * (@spandabel)
 * [14 years ago](https://wordpress.org/support/topic/error-in-functionsphp-please-help/#post-2731760)
 * **You just made my day!!!** That search-box wasn’t even supposed to be there –
   or anywhere.
    Thank you so much for your guidance and help!

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Error in functions.php. Please help!!’ is closed to new replies.

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * 9 replies
 * 3 participants
 * Last reply from: [spandabel](https://wordpress.org/support/users/spandabel/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/error-in-functionsphp-please-help/#post-2731760)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
