The MU forums have moved to WordPress.org

Edit default widget (4 posts)

  1. JMF
    Member
    Posted 17 years ago #

    I'm stumped -- I'd like to change the title of the default 'Links' widget so that it displays the word 'Links' instead of 'Blogroll' in the sidebar.

    I'm looking through widgets.php, and it looks like most of the others have a place for a title, but not the 'links' widget:


    function widget_links($args) {
    global $wp_db_version;
    extract($args);

    if ( $wp_db_version < 3582 ) {
    // This ONLY works with li/h2 sidebars.
    get_links_list();
    } else {
    wp_list_bookmarks(array('title_before'=>$before_title, 'title_after'=>$after_title));
    }
    }

    Anyone have an idea about how I'd change this?

  2. dsader
    Member
    Posted 17 years ago #

    http://codex.wordpress.org/Template_Tags/wp_list_bookmarks
    add to array a

    title_li='__('Links')'
  3. dsader
    Member
    Posted 17 years ago #

    http://codex.wordpress.org/Template_Tags/wp_list_bookmarks
    add to array a

    title_li='__('Links')'

    or

    Here's my link widget:

    function widget_links($args) {
    	global $wp_db_version;
    	extract($args);
    $title = empty($options['title']) ? __('Links') : $options['title'];
    
    	echo $before_widget . $before_title . $title . $after_title . "<ul>n";
    		wp_list_bookmarks(array('title_before'=>'<h3>', 'title_after'=>'</h3>'));
    	echo "</ul>n" . $after_widget;
    
    }
  4. JMF
    Member
    Posted 17 years ago #

    Thanks for the reply! I must admit I'm an idiot, though. :P Looking at yours, and reading the documentation more, I all of a sudden realized I was missing the 'Categories' in the 'Blogroll Management' tab! Grr. All I needed to do was change that, and I'm good to go.

    Thanks again!

About this Topic