How Do I Create a Pop Up Message in WordPress?

Creating a pop up message in WordPress is a fairly simple process. First, you will need to create a new file called popup.

php in your WordPress directory. This file will contain the code for your pop up message.

Next, you will need to add the following code to your popup.php file:

‘text/html; charset=utf-8′,

‘Cache-Control’ => ‘no-cache, no-store, must-revalidate’,

‘Pragma’ => ‘no-cache’,

‘Expires’ => ‘-1′,

‘X-Frame-Options’ => ‘SAMEORIGIN’

);

$popup = new WP_Popup( $message, $headers );

$popup->show();

?>

Finally, you will need to add the following line to your WordPress header:

echo $popup->get_title();

Your pop up message will now be displayed when someone visits your website.