[theme-reviewers] Child theme settings overwriting parent theme settings

Justin Tadlock justin at justintadlock.com
Wed Jun 18 22:29:29 UTC 2014


If you point me to some actual code, I might be able to help you.  It's
pretty easy to do per-theme settings (including child themes) if you use
the Theme Mods API.  Theme mods are saved based on the stylesheet, so a
child theme has different settings than its parent.  Plus, there are
existing hooks available if you want overwrite the default.


On Wed, Jun 18, 2014 at 4:12 PM, Thomas Usborne <hello at edge22.com> wrote:

> Hey guys,
>
>
>
> So I have a child theme that uses filters to change the parent theme's
> options which change the appearance of the theme.
>
>
>
> However, when using filters to change the default parent theme's settings,
> those defaults don't take place if the user has already saved their own
> custom options using the parent theme.
>
>
>
> This means when the user tries to install the child theme, it won't look
> as it should, because the defaults have already been changed by the user,
> and ignore the child theme's filters.
>
>
>
> Upon activation I had it so the parent theme's settings reset, making way
> for the child theme's settings.
>
>
>
> I thought this was the best way to remedy the situation, but I've been
> informed by Chip that child themes can't delete or overwrite the parent
> theme's settings.
>
>
>
> Do I have any other options here?
>
>
>
> Thanks!
>
> Tom
>
>
>
> _______________________________________________
> 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/20140618/b4407af0/attachment.html>


More information about the theme-reviewers mailing list