First of all you need to create a modal pop up with these parameters.
after that you can use cookie js.
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/src/js.cookie.min.js"></script>
Remember that you need to include jquery before loading this js.
For further details you can refer to https://github.com/js-cookie/js-cookie
After including above js and Jquery in your code. You can directly use Cookies.set('foo', 'bar')
to set a cookie with name foo
and can access it by Cookies.get('foo')
Now it depends on you how you use it in your program.
Related Posts:
- Identify User Language, Redirect to the corresponding page and Save the chosen language as Cookie
- How to set back-end language per user?
- How to keep plugin translations after updates?
- What is the best page ordering plugin that works well with WPML? [closed]
- Keep one user logged for a year?
- Disable saving comment details (name, e-mail) in cookie?
- Disable qTranslate by post type in admin + disable per page / post ID on front-end [closed]
- Force Plugin to English Translation
- Add code into on a per page/post basis
- What is the purpose of adding a .po file?
- Security error WP 4.0 + WP phpBB Bridge [closed]
- Qtranslate displays empty categories with get_categories()
- Detecting $_GET parameters from any page + Cookie
- Why load_textdomain work but not load_plugin_textdomain?
- Language Translation is not working?
- Setting up a multilingual wordpress site
- Set cookie then immediantly refresh the page
- How WordPress knows where to find locale files?
- Prepare plugin options for multi-lingual support
- How to set a custom title per language?
- More than one text-domain is being used because of the included templates for plugins
- Do We Need to Validate, Sanitize, or Filter Simple Numerical Superglobals (Cookies and Post)?
- how to load the language file in plugin?
- Why is my staging subdomain not sending wordpress_logged_in cookies?
- How to delete Passwrd Protected posts cookies when a user logged out from the site
- How to query the custom fields by language?
- Multi language site [closed]
- How to save generated JWT token to cookies on login?
- WordPress Keeps Logging Out – What Tests Can I Run to Solve This?
- User Session and Stored Cookies not get removed
- Custom rewrite rules not working with WPML
- Where does the cookie mo_page_views_counter come from?
- Force language in translate function
- polylang + category/tag custom language link
- How WordPress is able to change locale without using setlocale
- How to handle cookies from a WordPress plugin on a cached page?
- Login cookies set as wrong domain
- Xili language plugin not showing language flag [closed]
- add_action in a custom plugin
- Translation plugin to translate another plugins
- Plugin translation not working on WordPress.org
- Displaying content based on drop-down menu selection sitewide
- Blurry images when loading the page first time
- Translation to ACF relationship field
- How to handle a WordPress blog with articles in different languages?
- Language translation on a fresh english installation
- How to enable WPML in BuddyPress Multilingual Plugin in a single website? [closed]
- is_front_page breaks with url parameters generated by a plugin
- Cookies set by a plugin in wordpress for tracking
- Codeless random token generation to pass into multiple tracking links in a single page load
- Translation for a text that is not printed on the screen
- Cookie value changes back to previous value after changing
- Display value of the GET parameter in a new URL page
- How to implement data residency in my WordPress site
- I have English words in Kurdish pages
- WPML – Stop language redirection in initial load
- How do I make my site multi language? [closed]
- Block Google tracking on refuse consent of the user with plugin
- WordPress Admin login redirect to homepage
- WPGlobus Multilingual – REST API
- How can I store user preferences in WordPress and retreive them later?
- WordPress delete cookie
- How do I add languages?
- Why does WordPress use cookies for /wp-admin and /wp-content/plugins for non-admin users [duplicate]
- Implementation to count page visits of unique visitors based on a cookie
- I have a plugin that applies a Google translation to my page–how does the browser know which language to display?
- admin-ajax.php not working properly on subdomains
- Cookie set in a plugin visible in admin but not on front
- How do I change a plugin language of only one page?
- How can I save cookies to members
- set cookies for my whole site is not working
- WordPress Plugin: Where should I put my cookies for cURL?
- WordPress Site in Multiple Languages
- Undefined constant error in pluggable.php
- How to resolve these findings from security audit
- ERROR: Cookies are blocked due to unexpected output – no access to FTP
- How to delete Password Protected posts cookies when a user logged out from the site
- The Best Multilanguage Plugin supporting the FSE [closed]
- Stop the user if login from the cookies
- List of all existing WordPress plugins
- User-Specific Timezones? Hack? Plugin?
- Using the media uploader in a custom plugin
- Theme and Plugins sharing common libraries
- How to change Thumbnail size of next Gen Gallery plugin?
- Is there a way to programmatically enable a plugin?
- How can I get WordPress to save comments in markdown format?
- How to remove admin main menu name repetition
- Shortcode to update user meta
- How to protect WordPress from security scanner [closed]
- How to add a new column with text fields to WooCommerce Cart List?
- How to use filter to disable adding a product to wishlist?
- Apply html elements in php statement
- add_rewrite_rule to load different page, without changing URL in browser
- Gzip compression or Mod_deflate not working
- How to find the file path in WordPress?
- Swap themes locally
- Woocommerce Subscriptions – Customer change subscribed product after placed
- How to Change MU/BuddyPress Group Blog New Installation Defaults [closed]
- registration plugin [closed]
- Getting 504 Gateway Timeout Error on AWS Server! [closed]