Get Main Site Name
WordPress helper module to get the primary site name in multisite or blog name in single site
by curtistinkers · github.com/curtistinkers/get-main-site-name-wpplugin · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/curtistinkers/get-main-site-name-wpplugin/archive/refs/heads/main.zipGet Main Site Name plugin
This will output the name of the main site in a WordPress Multisite setup. If not in a multisite environment, it will return the name of the current site.
Usage
Use the helper function get_main_site_name_helper() anywhere in your theme or plugin.
Example
<?php
echo get_main_site_name_helper();