Simple Alert Plugin
Create an admin-side page under settings tab. This page contains following fields those are available with next points. Text field for adding text which will be displayed as alert on front side. Checkboxes for all custom post types.
For ex:
– posts
– pages
When admin will check any of the above post type’s checkbox, all posts of that post type will be listed below in multi-selectbox. User can select multiple posts from the selection for which they want to show alert on frontend. “Save Changes” button to save your changes.
When user will open any page, post or custom post type post and if it is selected from admin side then alert box should be opened. Alert box should contain admin side added text from settings page.
https://github.com/DevinVinson/WordPress-Plugin-Boilerplate
Backend Settings
Frontend Alert