The MU forums have moved to WordPress.org

How to change the BlogRoll on a new blog. (9 posts)

  1. Ba22Man
    Member
    Posted 17 years ago #

    Anyone here know how to change the Blogroll of the newly created blog?

  2. dizzy99
    Member
    Posted 17 years ago #

    Hi Ba22Man

    /wp-includes/wpmu-functions.php at lines 1222 define the default links that get inserted into the new blog blogrolls.

    Just add or change those there and your all set.

  3. Ba22Man
    Member
    Posted 17 years ago #

    tnx for the reply mate.. im gonna try it now.. :)

  4. Ba22Man
    Member
    Posted 17 years ago #

    it works mate.. tnx for your help.. anyway i have tried to add 3 links. only the two links has been included in the blog roll category, thats why the remaining link is not displayed any idea why this happens?

  5. dizzy99
    Member
    Posted 17 years ago #

    Not sure of the top of my head as i haven't actually modified that function yet, its on the "to do list" :)

    Are you sure the third link mirrors the first 2 ?

  6. Ba22Man
    Member
    Posted 17 years ago #

    no.. what i mean is the third link is not showing, because its now placed on the blog roll category. :)

  7. mypatricks
    Member
    Posted 17 years ago #

    you must add one more line, eg.

    $wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, link_count) VALUES ('{$blogroll_id}', '".addslashes(__('Blogroll'))."', '".sanitize_title(__('Blogroll'))."', 2)");
    $wpdb->query("INSERT INTO $wpdb->link2cat (link_id, category_id) VALUES (1, $blogroll_id)");
    $wpdb->query("INSERT INTO $wpdb->link2cat (link_id, category_id) VALUES (2, $blogroll_id)");
    $wpdb->query("INSERT INTO $wpdb->link2cat (link_id, category_id) VALUES (3, $blogroll_id)");

  8. Ba22Man
    Member
    Posted 17 years ago #

    i have already added another line. it works but it didn't show in the sidebar because its not included in the blog roll category..

  9. drmike
    Member
    Posted 17 years ago #

    Also change the hello world post to use the additional categories. Links only show up if there's posts in the categories.

About this Topic