Title: wp-includes/widgets.php &#8220;widget_many&#8221; example doesn&#8217;t work
Last modified: August 19, 2016

---

# wp-includes/widgets.php “widget_many” example doesn’t work

 *  [palamedes](https://wordpress.org/support/users/palamedes/)
 * (@palamedes)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/wp-includeswidgetsphp-widget_many-example-doesnt-work/)
 * Howdy guys.
 * I am in the process of creating my own custom theme and would like to create 
   a couple of custom widgets to go along with it.
 * Widgets are easy to create, but I came across a need for a “many widget” which
   you provide an example for in wp-includes/widgets.php
 * This code doesn’t work — after days of trying to get my widget to work following
   your example I finally just commented out my code entirely and cut/pasted your‘
   many_widget’ example into my functions.php file.
 * The “Many” control shows up and you can add items to it, however upon reloading
   the page anything you added is gone. (Which is exactly what I was experiencing
   with my attempt earlier). The data is in the database in the wp_options table,
   but its not being adhered to.
 * I have no solution for fixing this, but its clearly broken at this time.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 11 months ago](https://wordpress.org/support/topic/wp-includeswidgetsphp-widget_many-example-doesnt-work/#post-785666)
 * Yeah, that example sucks. Somebody should have double checked it.
 * Look at the text widget or my [PHP Code widget](http://wordpress.org/extend/plugins/php-code-widget/)
   instead. They’re subtlety different, and they work.
 *  Thread Starter [palamedes](https://wordpress.org/support/users/palamedes/)
 * (@palamedes)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/wp-includeswidgetsphp-widget_many-example-doesnt-work/#post-785710)
 * Yep.. much better.. Thanks otto.
 *  [litemotiv](https://wordpress.org/support/users/litemotiv/)
 * (@litemotiv)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/wp-includeswidgetsphp-widget_many-example-doesnt-work/#post-785908)
 * the text widget is barely readably itself, it’s really programming-101 to not
   name functions, variables and id’s ‘text’…. dramatic stuff, whoever made this
   should be….taught.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘wp-includes/widgets.php “widget_many” example doesn’t work’ is closed
to new replies.

## Tags

 * [widgets](https://wordpress.org/support/topic-tag/widgets/)
 * [widgets.php](https://wordpress.org/support/topic-tag/widgets-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [litemotiv](https://wordpress.org/support/users/litemotiv/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/wp-includeswidgetsphp-widget_many-example-doesnt-work/#post-785908)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
