• Hi,

    I’m trying to add a custom message to my plugin upon activation. I would simply like to show a message telling the user to please visit the plugin settings page.

    I have tried this hook;

    function jwl_visit_settings_page () {
     echo '<div id="message" class="updated"><p>Thank you for choosing Google Webfonts.  Please visit the settings page to get started.</p></div>';
    }
    register_activation_hook(__FILE__,'jwl_visit_settings_page');

    but I receive an error about generating xxx characters of unexpected output… and no message.

    I believe this has something to do with running the hook within the main.php file.

    All of my functions, from creating the admin pages and options, to displaying all content, is all located in one file.. my main.php file.

    What exactly is it I’m missing here?

The topic ‘register_activation_hook’ is closed to new replies.