wordpress 区分多语言站点

        $blog_title = get_bloginfo( 'name' );
        $table_name = '';
        if ( $blog_title == 'Driver Easy' ) {
            $table_name = 'show_gg_advertising';
        }
        else if ( $blog_title == 'Driver Easy Deutschland' ) {
            $table_name = 'show_2_gg_advertising';
        }            

可以通过 get_bloginfo('name') 区分不同站点

猜你喜欢

转载自www.cnblogs.com/ryanzheng/p/11058000.html