1

I need to display an admin notice or better a js popup after adding a new category.
In my functions.php I've created 2 functions:

add_action('create_category', 'popup_reminder_caller');
function popup_reminder_caller()
{
    add_action('admin_notices','popup_reminder');

}

function popup_reminder(){
   ?>
    <div class="error notice">
        <p><?php __( 'There has been an error. Bummer!' ); ?></p>
    </div>
    <?php    
}  

but doesn't work. The hook is correctly called (I'm debugging) but the notice won't shows. I did try with echo instead of __ but doesn't work either.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.