最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Prevent widgets from disappearing when swtiching from parent to child theme

programmeradmin4浏览0评论

I have a parent theme with 2 widget areas, header, sidebar, and footer, the header and the footer have 2 simple text widgets in them.

When I switch to the child theme which consists of just style.css and functions.php to enqueue the stylesheet, both the widgets are removed, they are also not in the inactive widgets area.

Is there a method for ensuring that the widgets are not lost when the themes are switched?

I have a parent theme with 2 widget areas, header, sidebar, and footer, the header and the footer have 2 simple text widgets in them.

When I switch to the child theme which consists of just style.css and functions.php to enqueue the stylesheet, both the widgets are removed, they are also not in the inactive widgets area.

Is there a method for ensuring that the widgets are not lost when the themes are switched?

Share Improve this question asked Dec 29, 2016 at 16:29 NazNaz 2114 silver badges13 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

I think you should check your parent theme functions.php for code which should load widgets and copy & paste such code to child theme functions.php file. It should work.

发布评论

评论列表(0)

  1. 暂无评论