Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress plugin returning site name

http://codex.wordpress.org/WPMU_Functions/get_current_site#Examples

In Wordpress, I am trying to retrieve the site name inside a plugin using the above function:

echo 'You are viewing '.get_current_site()->site_name;
echo '<br/>Domain '.get_current_site()->domain;
echo '<br/>id  '.get_current_site()->id ;
echo '<br/>path '.get_current_site()->path;

Unfortunately this is returning info from the top level site, not whichever subsite the plugin is on, which I want.

like image 415
JohnnyBizzle Avatar asked Feb 17 '26 04:02

JohnnyBizzle


1 Answers

i would think you can do it with:

get_bloginfo('name');

like image 148
kenzaraque Avatar answered Feb 18 '26 20:02

kenzaraque



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!