WP Manifestindependent plugin directory
manifest / multisite / get-main-site-name-wpplugin

Get Main Site Name

WordPress helper module to get the primary site name in multisite or blog name in single site

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/curtistinkers/get-main-site-name-wpplugin/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Get 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();