PHP Delete Cookie

<?php // set the expiration date to one hour ago setcookie(“user”, “”, time() – 3600); ?> <?php echo “Cookie ‘user’ is deleted.”; ?>

PHP Set Cookie and Retrieve Cookie

<?php $cookie_name = “user”; $cookie_value = “Alex Porter”; setcookie($cookie_name, $cookie_value, time() + (86400 * 30), “/”); ?> <?php if(!isset($_COOKIE[$cookie_name])) { echo “Cookie named ‘” ....

WordPress create a shortcode

Inside your themes functions.php add the below snippet and fill out the placeholders. ############################################################################ ////////////////////////////////////// // This is your shortcode. You reference it like you see below...

Pin It on Pinterest