Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress custom widget not registering

I am trying to develope a simple wordpress widget and have failed miserably so far. My own widget would not show up in the admin panel at all so i decided to try the sample widget code supplied in the wordpress codex @ http://codex.wordpress.org/Widgets_API

The same problem persists and i can't seem to find a solution anywhere online.

Exact code i tried: https://gist.github.com/Jeger/5382772

The file is stored in wp-content/plugins/Foo_Widget.php

like image 397
Jeger Avatar asked Jul 10 '26 09:07

Jeger


1 Answers

There was a very simple answer to this question not mentioned in the codex and something that will probably be obvious to someone used to developing for wordpress, but i will leave it here to let others having the same problem find.

On the top of the file there should be something similar to this:

/*
Plugin Name: Foo Widget
Description: Foo widget
Version: 1.0
Author: name
License: GPL2
*/
like image 107
Jeger Avatar answered Jul 11 '26 22:07

Jeger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!