• palamedes

    (@palamedes)


    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)

    (@otto42)

    ww.wp.xz.cn Admin

    Yeah, that example sucks. Somebody should have double checked it.

    Look at the text widget or my PHP Code widget instead. They’re subtlety different, and they work.

    Thread Starter palamedes

    (@palamedes)

    Yep.. much better.. Thanks otto.

    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.