I’m looking at a generated report which includes Wordfence and Updraft. Both of these are showing around 20 entries. I’d like to restrict this to just the most recent Wordfence scan and Updraft backup.
In a report template, I see [section.wordfence.scan] that generates the Wordfence data. Is there some option, like: [section.wordfence.scan scans=“1”] or [section.wordfence.scan.latest]? I tried all combinations and even did a php loop and creating an array. Nothing worked.
Unfortunately Pro Reports tokens do not support those kinds of parameters.
When in use, they will display all data within the date range of the report.
Please feel free to make a suggestion about this on our feedback site. That way, others can vote for it, letting us know which features our users want the most. https://voice.mainwp.com
If there are Wordfence scans on that log page, they will be included in the Pro Reports.
As for your original question about showing only a certain number of items for tokens - while this is not possible, there is a workaround which you may find useful.
Basically, you can limit how many table rows will be displayed in the reports by using this CSS code:
You can place it in the <style> section of the PHP file of a template.
In that example code, only the first 10 table rows and it will apply to all tables in the report.
If you will be adding this code to the template, please make sure to create a new custom template by following these instructions: Pro Reports - MainWP Knowledgebase