[theme-reviewers] Child themes discussion
Otto
otto at ottodestruct.com
Sat Jan 22 18:26:04 UTC 2011
On Sat, Jan 22, 2011 at 12:24 PM, Philip M. Hofer (Frumph)
<philip at frumph.net> wrote:
> if you do
>
> <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/header.jpg"
> alt="header image" />
>
> If a child theme exists, it will use the one from the chlid theme directory,
> if child theme does not exist will grab from the parent theme
But that won't work if you want a fallback position.
Like say my parent theme has header.jpg, and I only want to link to
the child's header.jpg if the child actually *has* a header.jpg. Won't
work.
On Sat, Jan 22, 2011 at 12:21 PM, <michael at mfields.org> wrote:
> I was never able to find a good solution in core, but put this function
> together last year http://wordpress.pastebin.com/1fkvPTTj to allow parent
> files to be overridden in child themes.
Using the is_child_theme() function in 3.0 will let you know if you're
running a child theme or not, allowing you to bypass some of that
check if you're not. Bit faster.
-Otto
More information about the theme-reviewers
mailing list