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)
- Are drop-in plugins a product of design
- Use a plugin to handle custom post types?
- 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
- 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
- Strip HTML comments from plugins in header/footer
- How to get the permalink of a page when loading my plugin
- WordPress and WebRTC?
- Hardcode a Plugin into theme
- 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
- 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
- w3 total cache and sitemap.xml
- Test if php document executed by WordPress or directly
- How to move the “create new account” higher in woocommerce
- My plugin won’t return anything [closed]
- Get all woocommerce comments/reviews
- WordPress contact form 7 to show the form dropdown menus as like [closed]
- What is generating Similar Posts and Related Posts on my blog?
- custom uploader in the admin area
- How do I add the same contact form to multiple wordpress sites and capture the response in one place or database?
- How to do the simplest possible frontend ajax call from a plugin?
- New bulk action to resend welcome emails
- I receive taxonomy id
- How do we update a custom file upload field with the Advanced Custom Field plugin?
- How to Include Fields in Query String When Making Request of WordPress.org Plugin API?
- Custom plugin – load enqueue only for this plugin
- Where do plugin variables live in the db?
- Function added to hook “new_to_publish” not executing – custom plugin
- Meta slider plugin only works after first refresh – Object has no method ‘flex slider’
- How to display a number of posts based on a Advanced Custom Field (ACF)
- How do I use a custom theme for the WP Maintenance Mode plugin?
- Javascript from Easy-Fancybox place into footer
- How to get Facebook comment plugin in blog? [closed]
- value not set in contact form 7 plugin of wordpress [closed]
- How to translate user added content in a plugin
- How to call php file in theme directory from plugin
- uncaught TypeError: Cannot read properties of null (reading ‘classList’) custom plugin
- How do I minify a plugins CSS/JS code?
- Elementor Pro display featured image on section -> style -> image using shortcode
- Error when adding extensions to wordpress version 5.9 with a DIVI install
- Create a pdf from the entries in DB
- I need plugin or method suggestion
- WordPress – send digital product with custom email
- Litespeed brokes my css
- German Market: How can I only show the imprint in the footer of the mail? [closed]
- Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /../plugins/rm-payment.php
- Trying to add a new feature in my wordpress website
- How can I implement radio buttons with icons in Contact form 7?
- Having multiple URL structure for wordpress blog
- SEO Site Title appearing in google search despite not being added
- How to use information from the database in the front-end?
- Plugin doesn’t update it’s version and code on WordPress.org
- Get value from an input field and pass into update_meta_data as $meta_value
- Passing variable from template file to the plugin file
- Method for creating many-to-one Relationships between custom posts and a single user?
- How can I add a custom checkbox / radio button on the admin theme options to display a CSS or other?
- How to delete posts older than one year with post meta, post attachments and files?
- Resetting AUTO_INCREMENT primary key
- Hide some shortcodes on posts from back-end
- Show a table from data submitted by a form from a user
- custom template only for content
- I keep getting fake users registrations
- Trouble implementing python on WordPress
- WordPress Search return wrong results
- WordPress audio player add class randomly using Audio Album plugin
- Adding google authenticator and use only email address of user
- WordPress how to create grouping like category
- How to add multiple versions of the same featured image for SEO reasons?
- How can I process all requests for a given directory in a URL with my plugin?
- E-commerce-like solution [closed]
- Rewrite rule help for gallery plugin
- Run WP inside a other Site without using frames
- Adding a google map to a metabox, map has inline style height=0
- getting image alt text via ACF plugin in WordPress [closed]
- What is wrong with this dbDelta syntax?
- Am I allowed to resell WordPress Premium Plugins under GPL? [closed]
- How is this sliding/scrolling navigation made?