Displaying admin notice dynamically
In that case wp_remote_get() will work fine. Create a notice.php file and uploaded it on my server. Then I have added these code into my plugin and it works for me. <?php $remote_data = wp_remote_get( ‘http://example.com/notice.php’ ); $remote_body = wp_remote_retrieve_datat( $remote_data ); ?> <div class=”notice”> <?php echo $remote_body ?> </div> Hope that helps.