[theme-reviewers] Child themes discussion

Chip Bennett chip at chipbennett.net
Sat Jan 22 18:46:36 UTC 2011


See, this is what I thought. I didn't think that get_stylesheet_ had a
fallback routine like get_template_part() has.

Chip

On Sat, Jan 22, 2011 at 12:29 PM, <michael at mfields.org> wrote:

> > <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 this means that if a child theme exists, it must include
> /images/header.jpg. I made the function to allow for
>
> <img src="<?php echo artpress_file_locate( '/images/header.jpg' ); ?>"
> > alt="header image" />
>
> The file will always exist in the parent, but if a child theme adds
> header.jpg to its images folder, this will be used instead. This way it's
> optional to include the file in the child.
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110122/34ef4e05/attachment-0001.htm>


More information about the theme-reviewers mailing list