You can only override functions in a Parent Theme if the Parent Theme makes functions pluggable (by wrapping them in an
if ( ! function_exists( 'function_name' ) ) conditional), or if the output of a function is passed through a filter (e.g.
return apply_filters( $filter_name, $function_output );
- Pluggable functions: in the Child Theme's
functions.php file, simply define a function with the same name as the pluggable function you want to override. This is often the case with, for example, a Theme's setup function, e.g.
- Filterable functions: in the Child Theme's
functions.php file, define a callback, and then call
add_filter( $filter_name, $callback );
If the Parent Theme doesn't provide either of these two methods, then the Parent Theme's functions cannot be overridden in a Child Theme.
Just for kicks and grins, since WordPress loads the Child Theme's
functions.php file immediately before the Parent Theme's
functions.php file, try adding the following to your Child Theme's functions.php:
define( 'TS_INC', get_stylesheet_directory() .'/inc' );
It's worth a shot, anyway.