In this document, we will go over how to add a ‘Go to site’ icon to the Manage Sites table.
This may be useful if you don’t have a URL column in your table, but would still like to be able to quickly open a Child Site in a new tab.
Additionally, since the icon takes up less space than a URL, it can also be visible in the mobile version of the table without expanding the Child Site row.
- Install MainWP Custom Dashboard extension
- Navigate to your MainWP Dashboard > Extensions > Custom Dashboard
- Open PHP tab
- Add the following code snippet
add_filter( 'mainwp_sitestable_getcolumns', 'mycustom_mainwp_sitestable_getcolumns', 10, 1 ); function mycustom_mainwp_sitestable_getcolumns( $columns ) { $columns['front_page_link'] = ''; return $columns; } add_filter( 'mainwp_sitestable_item', 'mycustom_mainwp_sitestable_item', 10, 1 ); function mycustom_mainwp_sitestable_item( $item ) { $item['front_page_link'] = ''; return $item; }
- Click the Save Changes button
Navigate to the Sites > Manage Sites page, and verify that the column has been added.
Drag and drop it to the desired spot. If it’s placed near the beginning of the table, it will also be visible in the mobile version without expanding the Child Site row.
For more information about customizing the tables in MainWP, check out this article: https://kb.mainwp.com/docs/customizing-tables-on-mainwp-dashboard/