⏲️ Estimated reading time: 2 min
WordPress Timed Popup – Auto Close in 10 Seconds. Create a WordPress popup box that appears on page load and automatically closes after 10 seconds. Perfect for short messages, announcements, or promotions without annoying your visitors.
📝 WordPress Timed Popup – Auto Close in 10 Seconds
Want to show a quick message on your WordPress site without interrupting the user experience? A timed popup is the perfect solution. This guide will help you create a lightweight popup that shows when a page loads and disappears after 10 seconds.
✅ Method 1: Add the Function
Copy the following code and place it in your child theme’s functions.php
file, or use the Code Snippets plugin to inject it safely.
function add_timed_popup_box() {
?>
<style>
#custom-popup {
position: fixed;
bottom: 20px;
right: 20px;
background: #ffffff;
color: #000;
padding: 20px;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
border-radius: 10px;
z-index: 9999;
display: none;
transition: opacity 0.3s ease;
}
#custom-popup.show {
display: block;
}
</style>
<div id="custom-popup">
<strong>Hello!</strong> This popup will disappear in 10 seconds.
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
const popup = document.getElementById('custom-popup');
popup.classList.add('show');
setTimeout(() => {
popup.classList.remove('show');
}, 10000); // 10 seconds
});
</script>
<?php
}
add_action('wp_footer', 'add_timed_popup_box');

💡 Customize Your Popup
- Message: Change the text inside the
<div>
- Position: Use CSS to move the popup around
- Time: Modify
10000
to set a different duration (in milliseconds)
🎯 Why Use This?
This is great for:
- Announcements
- Promotions
- GDPR notices
- Exit intent messages
It’s simple, fast-loading, and won’t require any heavy popup plugins.
✅ Method 2: Use a WordPress Popup Plugin (Recommended for Beginners)
The easiest way to create a popup is by using a plugin. Popular options include:
1. Popup Maker (Free & Pro)
- Go to Plugins > Add New
- Search for Popup Maker
- Install and activate
- Go to Popup Maker > Add Popup
- Customize title, content, triggers (like time delay, scroll, or click)
2. Elementor Popups (Pro Version Only)
- If you use Elementor Pro, go to Templates > Popups
- Create a new popup using drag-and-drop
- Set display conditions, triggers, and advanced rules
These plugins offer:
- Exit intent triggers
- Email opt-in integrations
- Advanced targeting rules
🏷️ Tags: wordpress popup, timed popup, popup auto close, wordpress functions, custom popup box, wordpress tips, user friendly popup, wordpress code, wordpress snippets, wordpress tutorial
Only logged-in users can submit reports.
Discover more from HelpZone
Subscribe to get the latest posts sent to your email.