Download Free Simple Cookies plugin
Description
Simple Cookies plugin allow to use 4 types of WordPress shortcodes with set of parameters in order to implement the dynamic content functionality and not only that.
1) [addsimplecookie parameter="" value="" time=""] — adds cookie.
Examples:
[addsimplecookie parameter="cookie1" value="any" time="1 y"]— adds cookie with “simplecookie_cookie1” name and1 yearlifetime if URL of the visited page contains parameter “cookie1“. Cookie content will be equal to URL parameter’s value, since “any” is a reserved word for the “value” parameter.[addsimplecookie parameter="cookie1" value="test" time="1 d"]— adds cookie with “simplecookie_cookie1” name and1 daylifetime. Cookie content will be “test“.
time parameter supports the following syntaxis as values:
- X min — X minutes;
- X h — X hours;
- X d — X days;
- X w — X weeks;
- X m — X months;
- X y — X years.
2) [showforsimplecookie parameter="" value=""] Content [/showforsimplecookie] — shows content if user has the cookie.
Examples:
[showforsimplecookie parameter="cookie1"]Content[/showforsimplecookie]— shows content if user has the cookie with name “simplecookie_cookie1” or URL of the visited page contains parameter with name “cookie1“.[showforsimplecookie parameter="cookie1" value="product"]Content[/showforsimplecookie]— shows content if user has the cookie with name “simplecookie_cookie1” and content equal to “product” or URL of the visited page contains parameter with name “cookie1” and value equal to “product“.
3) [hideforsimplecookie parameter="" value=""] Content [/hideforsimplecookie] — hides content if user has the cookie.
Examples:
[hideforsimplecookie parameter="cookie1"]Content[/hideforsimplecookie]— hides content if user has the cookie with name “simplecookie_cookie1” or URL of the visited page contains parameter with name “cookie1“.[hideforsimplecookie parameter="cookie1" value="product"]Content[/hideforsimplecookie]— hides content if user has the cookie with name “simplecookie_cookie1” and content equal to “product” or URL of the visited page contains parameter with name “cookie1” and value equal to “product“.
4) [removesimplecookie parameter="" value=""] — removes cookie.
Examples:
[removesimplecookie parameter="cookie1"]— removes cookie with name “simplecookie_cookie1” and any content.[removesimplecookie parameter="cookie1" value="product"]— removes cookie with name “simplecookie_cookie1” and content equal to “product“.