Skip to content

Instantly share code, notes, and snippets.

@ryanl4321
ryanl4321 / blogs-menu.php
Last active December 23, 2015 19:55
WordPress Multisite: List of all blogs
<?php
// This code was used to generate a menu showing all blogs on a WordPress
// Multisite installation.
// The shortcode [bloglist] was used in the homepage of the main blog to link to
// all the other blogs.
// Output a single menu item
function bloglist_entry($id, $title, $link_self){
global $blog_id;
if ($id == $blog_id && !$link_self){ return; }