wordpress theming - How to detect on which site am I? -


i using wordpress "multisite" different languages on site, , want know how can know on site i. can check page it, site, little bit tricky. have made site eng, , site fr, , couple more.

so far have tried check url :

stripos($_server['request_uri'],'/eng/')  

is there different way this?

use get_current_blog_id(): http://codex.wordpress.org/function_reference/get_current_blog_id

e.g.

$blog_id = get_current_blog_id(); 

i'd like:

if ( 1 === $blog_id ) {     echo 'this eng site.'; } 

if there multiple language options test you'd better switch:

switch ( $blog_id ) {     case 1:         echo 'this eng site.';         break; } 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -