List Subsites
A simple plugin to list all subsites in a WordPress Multisite installation.
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/menj/list-subsites/archive/refs/heads/main.zipA simple plugin to list all subsites in a WordPress Multisite installation with sorting options.
Description
The List Subsites plugin provides a shortcode [list_subsites] that you can use in any post or page on the main network site to display a list of all subsites in your WordPress Multisite installation. The list will include the subsite name, URL, and tagline. You can also sort the list by name, URL, or tagline in ascending or descending order using the sort and order shortcode attributes.
Installation
- Upload the
list-subsitesfolder to the/wp-content/plugins/directory. - Activate the plugin through the 'Plugins' menu in WordPress.
- Use the
[list_subsites]shortcode in your posts or pages on the main network site to display the list of subsites. Optionally, use thesortandorderattributes to customize the sorting of the list.
Usage
- Create a new post or page on your main network site.
- Add the
[list_subsites]shortcode where you want the list of subsites to appear. - Optionally, add the
sortandorderattributes to customize the sorting of the list. For example,[list_subsites sort="url" order="desc"]will display the list of subsites sorted by URL in descending order. - Save and publish the post or page.
- View the post or page to see the list of subsites.
Frequently Asked Questions
How do I use the plugin?
After activating the plugin, simply use the [list_subsites] shortcode in any post or page on the main network site to display the list of subsites. Optionally, use the sort and order attributes to customize the sorting of the list.
Can I customize the list's appearance?
Yes, the list is wrapped in a ul element with the class list-subsites, so you can add your own CSS styles to customize its appearance.
Changelog
1.1
- Added sorting options.
- Updated to reflect that the plugin should be used on the main network site.
- Added more instructions on how to use the plugin.
1.0
- Initial release.
Upgrade Notice
1.1
- Added sorting options.
- Updated to reflect that the plugin should be used on the main network site.
- Added more instructions on how to use the plugin.
1.0
- Initial release.