• urj.org

    (@urjorg)


    Hello,

    I am trying to write a function which will add a list of blogs from my multi site install to a drop down menu. I want to exclude certain blogs from the list.So far I can only get it to display every active blog but I would like to control which blogs show up in the list. Below is the main part of the code I have that does this.

    foreach ( $blogs as $blog ) {
    			switch_to_blog($blog->blog_id);
    			$nav .= '<li><a href="'.get_option('home').'">'.get_option('blogname').'</a></li>';
    			restore_current_blog();
    		}

    I want to be able to take the blog_id and filter out the ids that I don’t want in the list.

    I hope this is clear. Thank you in advance for you help.

    Jared

  • The topic ‘exclude blogs from a list’ is closed to new replies.