Simple Cookies

As simple as a cookie

Download Free Simple Cookies plugin

Simple Cookies

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:

  1. [addsimplecookie parameter="cookie1" value="any" time="1 y"] — adds cookie with “simplecookie_cookie1” name and 1 year lifetime 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.
  2. [addsimplecookie parameter="cookie1" value="test" time="1 d"] — adds cookie with “simplecookie_cookie1” name and 1 day lifetime. 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:

  1. [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“.
  2. [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:

  1. [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“.
  2. [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:

  1. [removesimplecookie parameter="cookie1"] — removes cookie with name “simplecookie_cookie1” and any content.
  2. [removesimplecookie parameter="cookie1" value="product"] — removes cookie with name “simplecookie_cookie1” and content equal to “product“.
Inbound Certified
Certified Bitrix Marketing Specialist
Certified Google Analytics Specialist
ИП Карпов Павел Дмитриевич
ИНН: 772973705115
ОГРНИП: 317774600074991
: Moscow, Michurinskyi prospekt, 25, 3