Home>Support>Custom widget in the theme

Custom widget in the theme

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Hi,

we are building a theme and we would like to add a custom widget using your widget bundle framework…

I followed this tutorial: https://siteorigin.com/docs/widgets-bundle/getting-started/creating-a-widget/

And at the part where the widget shows up in the “Plugins -> SiteOrigin widgets”, I can’t activate the widget.

When I click on “Activate”, the widget seems activate, but if i reload the page the widget is deactivated.

Are there some other steps that need to be done to make the custom widget work inside a theme?

I also tried with the active filter: https://siteorigin.com/docs/widgets-bundle/advanced-concepts/filters/active-widgets/, but no luck…

We are using a wordpress network setup and the development is local, but I sticked to the tutorial above…

Am I missing something?

Thanks and take care!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 8 months ago Gregor Capuder

    Hi,

    found the solution to the issue I was having…

    Each widget (php file) has to be in a folder with the same name as the php file. Example: /widget-hello/widget-hello.php

    source: https://github.com/siteorigin/docs/blob/develop/widgets-bundle/tutorials/theme-custom-widgets.md

    Take care!

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More