I used some javascript code to pop up the message, and placed it in my “Simple GDPR’ plugin https://wordpress.org/plugins/simple-gdpr/ .
I got the javascript code from https://cookieconsent.insites.com/ , which details how to do it.
I used the ‘after_header’ action , as in
add_action('after_header', 'my_gdpr_notice');
to display the notice, plus using the ‘enqueue_scripts
‘ functions to add the javascript code and the associated CSS for the message.
Related Posts:
- Implementing a CrunchBase.com Clone using WordPress?
- How to share category taxonomy with custom post type (The Event Calendar plugin)
- WP_query parameters for date range
- How to tell if plugin has been network activated
- Sync my svn repositories
- Getting a custom Gutenberg component’s state from outside that component
- Override plugin localization
- How wordpress detects a plugin update
- Right approach for plugin output styling/template
- When do I need to use esc_attr when using WordPress internal functions
- Absolute Path (ABSPATH) in WordPress is not working
- Pushing changes from localhost to live server?
- flush_rewrite_rules not working on plugin deactivation, invalid URLs not showing 404
- Create Proper WordPress Ajax Request in JavaScript, NOT jQuery
- How to select featured images for 1500 posts?
- Use touch_time() on front-end form via plugin
- Add jQuery to WordPress page
- Frontend editing, Frontend user dashboard
- How to get the permalink of a page when loading my plugin
- WordPress and WebRTC?
- Check for Active WordPress Plugins from the Block Editor
- Should you escape hardcoded URLs?
- Error in the wp-config.php file: PHP Fatal error: Uncaught Error: Unknown named parameter (PHP 8.0)
- How create a role with admin capability less 1 or 2?
- Ajax gives 400 error
- Override WP Class Private Function
- How to Include a Loop Template File in a Plugin
- Serialize data for wp options
- How to show Categories and Sub-categories using WooCommerce
- Duplicate Settings Plugin, Independent & Separate by Tab
- Prevent shortcode from being wrapped in tags
- React JSX in WordPress Plugin Development
- How to add a default value to get_option if it’s used as a variable?
- Can I make a super plugin that also has a theme?
- Creating a nav menu
- Executing Javascript when a New Post is Published
- How do I hide posts across all loops based on the value of a custom field?
- Plugin developer automated documentation
- How to make WordPress customizable for clients
- Loading a purchased jquery plugin in a wordpress theme
- Fullscreen Video/GIF Intro
- Multisite for Multisite?
- Basic function call on init failing
- Display a consistent Google Plus icon on ALL pages of my site
- breadcrumb need to show all pages and subpages
- Widget’s container?
- Is it possible not to load theme on a specific page in wordpress?
- How to change shortcode’s default theme?
- How to accept images at multiple sizes and aspect ratios and display as standardized image size / ratio?
- Mutliple users editing single document in wordspress
- Plugin: connect to external database without showing password
- wp_insert_post() inside save_post(): force WP to not update global post object?
- Woocommerce: Set thumbnail detail (clipping area)
- WordPress truncate posts question (plugin related)
- Filtered content appears in the excerpt
- My plugin does not install correctly if a previous version is still installed
- How to disable Wp-PageNavi at the top of the page
- Why aren’t my Follow Me links working?
- WordPress ping spam issue with Ping services?
- Hook from plugin doesn’t fire up from external PHP script
- Custom User Registration Form not showing
- Drag and drop widget always inserts image
- SMTP emails not picking up the correct From name and From email
- What database state changes happen after a post is manually “updated” with no changes?
- Display posts by alphabetical order
- wp_insert_post not inserting post from XML
- custom fields not displaying on wordpress site
- Overriding a function in a WordPress plugin
- after logout session not destroy from server/website side
- How To Toggle User_Meta in frontend in a form using PHP
- How to update a database entry with a wordpress plugin?
- Change Woo Custom Endpoint Titles from a Plugin
- Is there a way to display multiple authors on a post?
- custom sidebar plugin issue
- White blank screen while adding or editing pages in wordpress
- How can I store user preferences in WordPress and retreive them later?
- ACF Taxonomy search on backend (Relationship field)
- Template conflict with WC Payment Method
- My ajax request don´t work and return 0
- wp_insert_post() post_author and return post_id are not working
- Different email notifications (about pending posts) to different users
- Multiple Checkbox
- Template redirect inside of plugin not redirecting
- Theme specific plugin, how?
- Validating values using Settings API?
- Share common libraries across multiple themes/plugins
- Fatal error with jigoshop and woocommerce
- Plugins enqueuing jquery in head
- How do add_action and WP_Query
- WordPress ReAuth =1 Loop with wpCAS
- Plug-in (Slickr Flickr) works on local machine, but not server
- List plugins used in a WP site – guest, not admin [duplicate]
- Website and admin page are not loading [closed]
- How can I manage the background image of a slider based on the featured image of a page?
- Global Handle to Class unavailable in Plugin?
- Q&A lite plugin comments
- Integrating WordPress Content into a jQuery Slider
- Serious social interaction [closed]
- WordPress file manager plugin [closed]
- How to display multiple images in the before and after plugin?