The MU forums have moved to

Is blog_id the current blog? (3 posts)

  1. johnjamesjacoby
    Posted 14 years ago #

    Maybe I'm reinventing the wheel, but I wrote up a really simple function to use in templates to check if a specific blog_id is the current one. Useful for highlighting navigation items if you repurpose your blogs into specific site areas and want to have a tabs class be "selected", that kind of thing...

    function is_current_blog( $blog_id ) {
    	global $current_blog;
    	if ( $blog_id == $current_blog->blog_id )
    		return true;
    	return false;
  2. andrea_r
    Posted 14 years ago #

    Awesome, looks handy.

    Thanks, triple-J. :D

  3. johnjamesjacoby
    Posted 14 years ago #

    Heeyyoo Andrea_R! I'm stepping into your territory now! Look out! Haha!

About this Topic

  • Started 14 years ago by johnjamesjacoby
  • Latest reply from johnjamesjacoby