Title: Getting functions.php error on child theme
Last modified: August 19, 2016

---

# Getting functions.php error on child theme

 *  Resolved [jepser](https://wordpress.org/support/users/jepser/)
 * (@jepser)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/getting-functionsphp-error-on-child-theme/)
 * Hi!
    I’m using child themes with a parent I create. I have the function:
 *     ```
       function get_block($block_url){
       	$bloque = include(TEMPLATEPATH . '/includes/' . $block_url . '.php');
       	return $bloque;
       }
       ```
   
 * This function is for include blocks of code like
 * `<?php get_block('custom-sub') ?>` so here I have it in the /wp-content/themes/
   parent-theme/includes/thefile.php
 * But now I want to include custom blocks that are only for child themes, that 
   are located in /wp-content/themes/child-theme/includes/thefile.php
 * But I’m getting this error:
 * Warning: include(C:\server\ugalileo/wp-content/themes/galileo-main/includes/carreras-
   list.php) [function.include]: failed to open stream: No such file or directory
   in C:\server\ugalileo\wp-content\themes\galileo-facultades\functions.php on line
   5
 * Warning: include() [function.include]: Failed opening ‘C:\server\ugalileo/wp-
   content/themes/galileo-main/includes/carreras-list.php’ for inclusion (include_path
   =’.;C:\php5\pear’) in C:\server\ugalileo\wp-content\themes\galileo-facultades\
   functions.php on line 5
 * I tried to make a get_child_block in the childs functions.php but I didn’t helps
   me.

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/getting-functionsphp-error-on-child-theme/#post-1701507)
 * Try:
 *     ```
       function get_block($block_url){
       	$bloque = include(get_stylesheet_directory() . '/includes/' . $block_url . '.php');
       	return $bloque;
       }
       ```
   
 *  Thread Starter [jepser](https://wordpress.org/support/users/jepser/)
 * (@jepser)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/getting-functionsphp-error-on-child-theme/#post-1701655)
 * thanks dude!

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

The topic ‘Getting functions.php error on child theme’ is closed to new replies.

## Tags

 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)
 * [custom type](https://wordpress.org/support/topic-tag/custom-type/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [jepser](https://wordpress.org/support/users/jepser/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/getting-functionsphp-error-on-child-theme/#post-1701655)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
