If you’re using Download Monitor and wish to disable the reports section, you can easily achieve this by adding a simple line of code to your WordPress site. The following documentation will guide you through the process:
Prerequisites
Before proceeding, ensure that you have:
- A working WordPress website.
- Download Monitor plugin installed and activated.
Steps to Disable the Reports Section
- Access Your WordPress Dashboard
Log in to your WordPress admin panel: https://your-domain.com/wp-admin - Locate Your Child Theme’s
functions.phpFile
It is recommended to make this customization in a child theme if you are not already using one. This ensures your changes won’t be lost when you update the main theme. Navigate to your child theme’s directory, typically found atwp-content/themes/your-child-theme/. - Edit the
functions.phpFile
Open thefunctions.phpfile within your child theme in a code editor or use the built-in WordPress theme editor. - Add the Filter Function
Inside thefunctions.phpfile, add the following code snippet at the end:add_filter( 'dlm_enable_reports', '__return_false' );
Adding this code in functions.php will effectively disable the reports section in Download Monitor. - Save the File
Save thefunctions.phpfile after adding the code. - Verify the Change
Now, when you access the Download Monitor section in your WordPress dashboard, you will notice that the reports section is no longer available.
Conclusion
By following these simple steps and adding the provided code snippet to your child theme’s functions.php file, you have successfully disabled the reports section in Download Monitor. This customization can be beneficial in situations where you don’t require download reports and want to streamline the user interface.
Keep in mind that the Download Monitor plugin may receive updates, but your customization will remain intact in your child theme’s functions.php file, ensuring a smooth and consistent user experience on your website.
