How to Setup Cookie Notification Bar in WordPress
Have you ever seen any popup box appears when you enter some kind of websites? If yes, then you might be wondering “What is this?”. Basically, many website owners don’t care about this type of notices. This is called Cookie Notification Bar.
What are Cookies
Cookies are small text files that a website may put on your computer or mobile device when you first visit a site or page. This cookie also helps the browser to recognize your device the next time you visit.
Basically, cookies are created when a user’s browser loads a website. Those cookies don’t contain only browsing information but also contain ads, widgets, or other elements on the page being loaded.
There are many ways cookies can help a user. For example, cookies can help by remembering his/her username and others personal information. When a user logs into a secure area of the website, then the user is asked: “Remember me”. This way login information is stored in a cookie, so the user can enter and leave the website without having to re-enter the same authentication information over and over.
There are two types of cookies that basically stores data on user’s devices. Those are Session Cookies and Persistent Cookies.
- Session Cookies: Session means temporary. A Session Cookie that is erased when the user closes the Web browser. As it is a temporary storage cookie, so it doesn’t collect information from the user’s device.
- Persistent Cookies: Persistent cookies also known as permanent cookies. This type of cookies is stored in user’s devices until it expires or until the user deletes the cookie. Persistent cookies are used to collect identifying information about the user.
WordPress does not use sessions by default. It stores a cookie for user authentication when a user login to the site’s backend. But if you have an E-commerce site or any product selling website and you are focusing mainly customers from EU. So you can show Cookie Notification Bar to confirm what type of information your site will collect from users. In this tutorial I am going to share how to add Cookie Notification Popup in WordPres.
How to Show Cookie Notification Bar in WordPress
There are several ways you can show Cookie Notification Bar/ Popup in WordPress. Either you can add some code in your theme file or you can use WordPress plugins.
Add Cookie Notification Bar by Adding Codes
#1 Cookie Consent
If you want to show Cookie Notification Popup in WordPress or any other site, then Cookie Consent is the best option for you. Although, you need to add codes in your header manually. So, do this if you are familiar with it. To do this, you need to go this website or click here.
To setup Cookie Consent, you just need to copy the code and paste in your header.php, just before the
Silktide is one of the most popular Cookie Consent services available on the internet. Silktide is a free and fully open-source, so you can customize it as you want.
It works the same way as Cookie Consent does. If you don’t want to install any plugin for popping up Cookie Notification, then you should try Silktide. It doesn’t affect your site performance as it is very lightweight, ~3.5kb minified, and no Jquery or other dependencies.
Add Cookie Notification Popup by Using Plugins
#1 Cookie Notice by dFactory
This plugin comes with many features and you can customize it from your WordPress admin dashboard. You can set custom messages that will be shown to users and can modify button text, positions, animations etc.
- Customize the Cookie message.
- Redirect users to custom link or Page link for “more” cookie information.
- Can set cookie expiry 1day to infinite time.
- Option to accept cookies on a scroll.
- Animate the message box after cookie is accepted.
- Change the position of Cookie Notification Popup.
- Can set animation style and button color.
#2 Cookie Law Info
Cookie Law Info is the most advanced WordPress Cookie notification popup plugin. This plugin adds a banner to your website either in the header or footer so you can show your compliance status regarding the new EU Cookie Law.
You can fully customize the style, colors, fonts, styles, the position on the page and even how it behaves when you click “accept”. This plugin can be set to make the cookie bar disappear after a few seconds or to accept on a scroll.
- This plugin is the most advanced and fully customizable Cookie notification bar plugin for WordPress.
- Automatically close the cookie bar after a delay.
- Put the cookie bar in either the header or the footer.
- WPML compatible & qTranslate support.
#3 EU Cookie Law Compliance
If you want to highlight your Cookie notification bar in modern style, then EU Cookie Law Compliance plugin is the best option for you. This plugin comes with stunning themes that change layout style and makes more beautiful. This plugin can be used in portfolio or travel website.
It includes 4 different flexible layouts and easy to customize. You can change message fonts and character sets.
- Fully customizable.
- You can place the cookie bar in either the header or the footer.
- You can hide or show refuse button.
- You can set the duration time and set start time.
- Available in total 4 layouts.
- WPML compatible.
#4 Cookie Law Bar
Cookie Law Bar is simple and lightweight WordPress plugin for showing information that your website uses cookie. From plugin settings, you can set Cookie notification bar location either top or bottom.
You can set custom bar message and you have to put more link manually as the plugin comes with limited features. You can also change button and button background color.
- Loads very quickly(Zero load time).
- Fully customizable.
- Smooth slide bottom or top bar.
- You can change button color, background color and can set custom message.
#5 Simple Cookie Notification Bar
Simple Cookie Notification Bar plugin allows you to display a simple cookie notification bar on the bottom of the page. You can add a ‘More Information’ button with a link on it. All texts, colors and font size can be changed from a simple settings form.
- Fully Responsive.
- All texts, colors and font size are changeable.
- Possible to add a ‘More Information’ button with a link on it.
- Compatible with Polylang and WPML multilingual plugins.