• Resolved truelux

    (@truelux)


    Is there a way to create a php code that makes html coding appear, only on specific sites (by their ID)?

    For example:
    <?php if ( is_multisite(2) ) { echo 'test'; } ?>

    I know this doesn’t work but was curious to know if there’s something out there like this? This way I don’t have to go to admin/widget panel all the time. I can just edit it right away.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I think the test you want is

    global $blog_id;
    if ( $blog_id == 2 ) { echo 'test'; }

    But test that as I’m doing it from searching and can’t test it myself right now. 😉

    Thread Starter truelux

    (@truelux)

    Awesome! That worked perfectly.

    thank you so much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Make HTML Appear on Specific Multisite Site's by ID?’ is closed to new replies.