Skip to main content

What You’ll Learn

  • Adding CSS IDs to report table sections
  • Writing CSS to limit displayed rows
  • Customizing the number of entries shown
  • Uploading modified templates

Extension Add-on - This add-on provides standalone functionality within MainWP Dashboard. No third-party plugins required.
If you have a lot of Plugin updates or Backups performed during a particular time period, it may be desirable to limit the number of entries shown in the report. This can be accomplished by making small changes in the PHP file of the Pro Report template.
If you are using the built-in template, you will have to create a custom one, otherwise an update to Pro Reports extension will overwrite your changes. To learn more about editing and customizing the PHP file of the Pro Report templates, please visit this help document.

Example for Backup data section

In this example, we will cover how to limit the entries in the Backups section to 5, but the same logic applies to other data sections. In the Backups Data section, attach a CSS ID to the body of the table, as so: PHP template with CSS ID attached to backup table body And then, in the </code> section, at the top of the PHP file, add the following:
#backuptable tr { display:none; }
#backuptable > tr:nth-child(-n+5){ display: table-row; }
Change the 5 in these brackets (-n+5) to a desired number of entries to be shown. CSS code limiting table rows to display only 5 entries Save the changes to the PHP file and upload it to /wp-content/uploads/mainwp/report-templates/. Report template upload directory path