What You’ll Learn
- How to add custom columns to the Manage Sites table
- How to populate columns with site data
- How to position columns in the table
Prerequisites
- Custom Dashboard extension (free)
Example: Add a cURL Version Column
This example adds a column that displays the cURL version for each child site.Install Custom Dashboard
Install the Custom Dashboard extension.
How It Works
The code uses two WordPress filters:| Filter | Purpose |
|---|---|
mainwp_sitestable_getcolumns | Registers the new column in the table header |
mainwp_sitestable_item | Populates the column with data for each row |
Code Structure
Available Site Data
You can access various site information through themainwp_getwebsiteoptions filter:
child_curl_version- cURL versionphpversion- PHP versionwp_version- WordPress versionchild_site_info- Various site details
Other Column Examples
- Add Go to Site Icon - Quick link to site front page
Self-Check Checklist
- Custom Dashboard extension installed
- PHP code added and saved
- New column appears in Manage Sites table
- Column displays correct data
- Column positioned as desired
Related Resources
- MainWP User Interface - Table customization overview
- Custom Dashboard Extension - Extension documentation
