Getting functions.php 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.phpBut 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.
The topic ‘Getting functions.php error on child theme’ is closed to new replies.