Title: error in functions.php
Last modified: August 19, 2016

---

# error in functions.php

 *  [albern](https://wordpress.org/support/users/albern/)
 * (@albern)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/error-in-functionsphp-1/)
 * Hi, I’m trying to add custom function is_child to functions.php file
 * and I’m getting the error:
    Parse error: syntax error, unexpected T_FUNCTION 
   in /home/content/45/7069945/html/wp-content/themes/mountain-dawn/functions.php
   on line 8
 * this is my functions.php
 *     ```
       <?php
   
       if ( function_exists('register_sidebars') )
       register_sidebars(2);
   
       Remove_action('wp_head', 'wp_generator');
   
       function is_child($parent) {
       	global $wp_query;
       	if ($wp_query->post->post_parent == $parent) {
       		$return = true;
       	}
       	else {
       		$return = false;
       	}
       	return $return;
       }
       ?>
       ```
   
 * any suggestion?

The topic ‘error in functions.php’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [albern](https://wordpress.org/support/users/albern/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/error-in-functionsphp-1/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
