• Member

    I’m trying to get the “show top commentators” plugin to function as a widget. I’ve read the information on creating widgets and a tutorial I found here: https://headzoo.com/tutorials/making-your-wordpress-plugin-widget-ready

    So far I have added this to the plugin file:`//widgetize
    add_action(‘plugins_loaded’, ‘my_init’);
    function my_init() {
    if (!function_exists(‘register_sidebar_widget’)) {
    return;
    }
    register_sidebar_widget(‘Top Commentators’, ‘ns_show_top_commentators’);
    register_widget_control(‘Top Commentators’, ‘ns_show_top_commentators’);
    }
    ` which makes the “top commentators” widget apear in the adim. When I add to the sidebar and save it functions but doesn’t acutally show up on the site. I know I’m mising some kind of call to show the information in the widget box but I keep getting code errors. Can anyone help?

  • The topic ‘convert plugin to widget’ is closed to new replies.