[resolved] [closed] How to get the current site's/blog's ID? (4 posts)

  1. jumust
    Posted 5 years ago #

    I'd like to display different links for each of my blog in my network, so that if is Blog1 will display different links than Blog2. I'm trying to use this code but it doesn't display anything.

    global $blog_id;
    if ($blog_id == 4) {
       //First blog links
    } else {
       //Default links <a href="http:\\example.com>example</a>

    Is that wrong?


  2. Well ... do you have a blog #4? :)

    What happens when you put in a value of 1 or 2?

  3. //Default links example

    The // after the http: are definitely wrong...

Topic Closed

This topic has been closed to new replies.

About this Topic