Custom widget don’t appear on my front end
Hello
I started to create my custom widgets, most of elements looks good, I can use my widget, I can enter text etc.
But I have nothing on my page after add it for my site. My first widget should show me just H1 with given text. So, can you suggest me any resolution for this problem?
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
8Hi Paweł,
Are you using the SiteOrigin Widgets Bundle to create your widgets?
If you are, please give the section on HTML Templates a read.
If you aren’t, I would take a look at a few tutorials on developing WordPress widgets as they’ll outline how to output widget data.
There is all what I wrote (at the left, you can see my folder structure – its default)
Hi Paweł,
The code in the provided screenshot looks correct. Can you please send me the complete plugin so I can run some tests against it?
Of course, can I send by dropbox? It’s a link: https://www.dropbox.com/s/5emevgtt8bmjwan/hello-world.zip?dl=0
Hi Paweł,
Thanks. The siteorigin_widget_register function needs to pass a valid widget id to function correctly. The widget id you’re setting isn’t correct. Please change:
siteorigin_widget_register('hello-world', __FILE__, 'Hello_World_Widget');To:
siteorigin_widget_register('hello-world-widget', __FILE__, 'Hello_World_Widget');So stupid mistake :P
You are awesome, thank you so much :)))
Hi Paweł,
No worries mate. Great to hear it’s working without issue for you now! :)
Please be sure to post another thread if you have any other questions.
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.