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 a copy of a Pro Reports template PHP file.
If you are editing one of the built-in report templates, first create a custom copy. Otherwise, a Pro Reports Extension update can overwrite your changes. To learn more about creating and editing a custom template, see Create Custom Report Templates.

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 table body (<tbody>), as shown here: PHP template with CSS ID attached to backup table body Then, inside the <style type="text/css"> section near 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