• I saw that there is a template function the_widget() which enables theme programmer to display a theme-required mandatory widget without using sidebar functions.

    Unfortunately, wp dev team seems to have forgoten that widgets used in this manner can’t offer options for theme end user to edit or choose in admin panel, since the only way to access options is to add widget to sidebar.

    Adding it as option, breaks requirement for mandatory loading of widget (offered by the_widget() function) and even introduces possibility that theme end user will add wrong widget further complicating the matter.

    So, my request is to give theme programmers ability to register widgets so that theme users have direct access to theme-related non-optional widgets in (for example) theme appereance admin panel.

    The only way around it, as far as i see, is write separate code in functions.php, which is kind of non-standard way of doing it.

    Function register_widget() is almost there, it just needs a little push forward to enable creation of mandatory widgets with admin panel options.

    Example: displaying a piece of text and image that can be changed in admin panel. If theme user wants to change displayed text, it must be edited from PHP, not a user-friendly way (btw : who needs this type of widget when static HTML can do a better job ?)

    code
    the_widget(‘WP_Widget_Text’, $instance, $args);

    Clearly shows that user can’t access displayed data without resorting to dive into PHP code.

  • The topic ‘enable sidebar-independant admin-editable widgets for themes’ is closed to new replies.