Push notifications are messages that pop up on your screen, to let you know when something happens on your device.In the past, push notifications were limited to applications and system updates. However, it’s become more and more common for websites to also implement this feature.
How to Add Push Notifications to WordPress
1.Install the OneSignal Plugin
once install the plugin will create a new tab in your dashboard called OneSignal Push.
2.Set Up a OneSignal Account
Goto https://onesignal.com/ and click on the button called GET STARTED next to Web Push.You can sign up using credentials from various social media platforms, or through your email.
3.Create a Push Notification App
To get started, go to your OneSignal dashboard and click on the Add a new app button.OneSignal will ask you to set a name for your app, you can use any name you want. Then, the service will ask you what type of notifications you want to configure. Choose the option labeled Web Push.
Now, you can choose what type of integration you want to use. Click on the WordPress Plugin or Website Builder button, and choose WordPress from the options.
Finally, scroll down and enter your site’s details, including its name and URL.
4.Configure the OneSignal Plugin
After saving your configuration in the OneSignal dashboard, you’ll see a new screen showing your APP ID and API KEY.
go to the OneSignal Push tab on your wp Dashboard and enter the required details.one for your App ID, another for your API Key, and a final one for your app’s label.As for your app’s label, that’s the name you chose during the previous step.
Once you fill out all three fields, scroll down to take care of a few extra settings.