开发者

Wordpress Widget auto activate

开发者 https://www.devze.com 2022-12-29 05:50 出处:网络
I am new at widgets, but I have to write my own widget and get it to display correctly in my theme. Now, I have to add this widget \"auto activate\" in the sidebar.

I am new at widgets, but I have to write my own widget and get it to display correctly in my theme.

Now, I have to add this widget "auto activate" in the sidebar.

So, when user install this the开发者_如何学JAVAme, Widget is automatically add in Sidebar, So user have to not set widget in sidebar from admin panel.

Is that possible?


Yes and no. You can build it as a default widget to be included in the sidebar if no other widgets are there. But if the sidebar is truly widget-ready and the administrator pops a new sidebar widget into the lineup, things will automatically switch over to use the admin's specified settings (the list of widgets they've manually added to the sidebar).

So yes, you can set it up as a default. But no, you can't make it auto-activate.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号