There are 2 ways to add cookies to your website. You could either:
1. Custom coding them. With JavaScript codes on either the header or footer of your website. Your JS codes should include Cookie Name and Cookie value. Including an expiration date, as in the period of time after which the cookie expires, Path, Domain type, and Security measures are optional.
2. Using WordPress Plugins. An efficient alternative to lengthy JS codes are plugins that essentially do the same job. Complianz is all-in-one cookie creator, meaning it also offers banner customization. Top features you should look for in cookie creating plugins (these features are present in Complianz as well) are legal help ( generating all required legal documents), consent management, and support of a wide range of regions.