How to get a Child Theme to use the Parent Theme's widgets
-
I’m currently developing a website where the parent theme and child themes are very similar. I want the parent theme’s widgets to be editable by the network admin, however I want those widgets to also display in the same position on the child theme, not editable by those users.
What I need is a way to get the dynamic_sidebar() function to not only pull from a position, but from the parent theme as well. This will be an ideal solution as I will only have to change a very small amount of files in the child theme.
Any ideas on this? With child themes gaining popularity it might be a good time to consider expanding the dynamic_sidebar() function to:
dynamic_sidebar($index, $theme);
I could then write a new functions.php file in the child theme to prevent administrators of the child themes to make any changes to those widget positions.
Or maybe there is an easy way to do this already?
I appreciate the help.
- The topic ‘How to get a Child Theme to use the Parent Theme's widgets’ is closed to new replies.