WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Determine which blog in a network? (3 posts)

  1. dcherring
    Member
    Posted 3 years ago #

    I've added some changes to a piece of php code in my theme, and I want this code to run only on a certain page in the top level blog in a network.

    I have already figured out the "certain page" part of this endeavor, and that works great. Now I'm trying to find a function in wordpress that I can call to determine which blog in the network is currently tickling this code. So far, I'm not finding it.

    Can anyone tell me if such a function exists and what it is?

    If it's not a matter of calling a function in an "if" statement, then is there another way to do what I want to do?

    Thanks!
    David

  2. Something like

    global $blog_id;
    if($blog_id == 1234)
  3. dcherring
    Member
    Posted 3 years ago #

    Ah! Lightbulb moment here. ;-)

    Thanks, Andrea!

    David

Topic Closed

This topic has been closed to new replies.

About this Topic