Complete guide to setting up and customizing OneSignal Web Push notifications on WordPress sites using plugin versions 2.x.x, including advanced customizations, prompts, and troubleshooting
Platform selection interface showing Web option
Web push integration options with WordPress Plugin highlighted
Site Setup configuration form with required fields
Field | Description | Requirements |
---|---|---|
Site Name | Default name displayed in push notifications | Keep concise for better display |
Site URL | Your complete website URL | Must include http:// or https:// and match your actual URL format |
Auto Resubscribe | Automatically resubscribes returning users (HTTPS only) | Recommended - Reduces friction for users who cleared browser data |
Default Icon URL | Icon for prompts and notifications | Must be HTTPS, square 256x256 pixels, PNG/JPG/GIF format |
Advanced push settings showing Safari certificate upload options
OneSignal dashboard showing App ID and API Key locations
WordPress plugin configuration showing API key input fields
Prompt settings showing Slide Prompt and Subscription Bell options
Save button location at bottom of configuration page
Post editor showing OneSignal notification checkbox
Automatic notification settings showing auto-send option
Prompt settings showing disabled Slide and Native prompts
Advanced settings showing manual initialization toggle
onesignal_initialize_sdk
filter to control initialization based on page properties.
onesignal_send_notification
filter:
functions.php
for:
Featured image settings showing icon and large image options
Third-party plugin integration settings
Custom post types configuration field
https://yoursite.com/wp-admin/post-new.php?post_type=your_custom_type
The post_type
parameter shows the name to add.
Mobile platform integration toggle
wp-content/mu-plugins/
to prevent it from being overwritten by updates.wp-content/mu-plugins/onesignal-custom.php
with your custom code.
onesignal_include_post
filter to explicitly include your post typeonesignal_send_notification
filterwp_postmeta
table:
Entry | Description |
---|---|
onesignal_meta_box_present | Confirms OneSignal was active when post was published |
onesignal_send_notification | Tracks notification sending |
status | HTTP status of notification (200 = success) |
response_body | API response with notification ID and recipient count |
recipients | Number of users who received the notification |
support@onesignal.com