• Resolved Bornholmeren

    (@bornholmeren)


    How do I display a list of blogs in Multisite, preferably in a page.

    I have installed the “Multi-Site Site List Shortcode” plugin but this plugin still shows deleted blogs.

    Link: https://bornholmeren.net/menu/blogs/ “Momses kreative side” are deleted but still on the list.

    Therefore I am looking for another solution.

    [Signature removed by moderator per forum rules.]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Fine tuning a plugin to your specific needs may be an necessary alternative for you.

    Probably will need to edit the plugin, or fork a version of it into your own collection of scripts.

    Find and edit the $blogs list query:

    //get blog list
    $blogs = $wpdb->get_col("SELECT blog_id FROM <code>&quot; . $wpdb->blogs . &quot;</code> WHERE public = '1' AND archived = '0' AND mature = '0' AND spam = '0' ORDER BY blog_id DESC");

    add a filter for deleted = ‘0’

    //get blog list
    $blogs = $wpdb->get_col("SELECT blog_id FROM <code>&quot; . $wpdb->blogs . &quot;</code> WHERE  public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' ORDER BY blog_id DESC");
    Thread Starter Bornholmeren

    (@bornholmeren)

    Thank you very much, David, for your answer.

    But I did not know this: When a user delete their blog, the blog will still appear on the network’s list of sites, but marked “deleted”.

    Therefore it will still be shown on “Multi-Site Site List Shortcode” until deleted by Network admin from the network`s list of sites.

    Sorry for the inconvenience.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcode to display list of blogs’ is closed to new replies.