• I have just joined the world of programming widgets, and im obviously not that good because i made a sidebar widget to display authors and it only displays in the furthest top left corner of my page.

    Can anyone point out whats wrong in my code.

    add_action('widgets_init', 'widget_display_author_init');
    function widget_display_author_init() {
      	if ( !function_exists('register_sidebar_widget') ) {
      		return;
    	}
      	function widget_display_author($args) {
      		extract($args);
      		echo "$before_widget<div id='display_author'></div>$after_widget";
    	}
      	register_sidebar_widget('Display Author', 'widget_display_author');
    }
    
    add_action('wp_head', 'display_author_wp_head');
    function display_author_wp_head() {
    
    	wp_list_authors();
    
    }

    Thanks!

  • The topic ‘odd placement on my widget’ is closed to new replies.