How to return a blank page

To return a blank page that’s been created in a plugin like so:

Example: blank-page.php

<?php
// Blank PHP page...

Use the following function:

add_filter( 'some_tag', 'wpse_238008_blank_page', 99 );

function wpse_238008_blank_page() { // Template with an empty page
    define( 'PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
    return PLUGIN_PATH . '/path/to/blank-page.php';
}

Replace the following to suit your needs

  • some_tag – Name of the filter to hook the function to
  • /path/to/blank-page.php – Location of your blank page in your plugin

Your question isn’t very clear when you say:

…how do I return a blank/white page in the admin area…

If you can update your question to specify where you want to see this exactly, I can give you an updated answer.