WordPress.org

Forums

How to show something depending on the blog title (4 posts)

  1. jaimecivi
    Member
    Posted 1 year ago #

    Hi!

    Please, i need a little help for my WordPress Multisite. I use the same template for all the sites (subdomains) of my multisite, and i need to be able to show something depending on the blog title (or some titles) (wp_title),

    Thanks!

  2. Use blog ID to change:

    <?php
    global $blog_id;
    if ($blog_id == 1) {
       //do something
    } else {
       //do something else
    }
  3. jaimecivi
    Member
    Posted 1 year ago #

    Thank you very much, added and working well. How can i do it with several Id's?

  4. Use several ifs.

    <?php
    global $blog_id;
    if ($blog_id == 1) {
       //do something
    } if ($blog_id == 2) {
       //do something for 2
    } else {
       //do something else
    }

Topic Closed

This topic has been closed to new replies.

About this Topic