by Garth | May 8, 2018 | PHP
<?php // set the expiration date to one hour ago setcookie(“user”, “”, time() – 3600); ?> <?php echo “Cookie ‘user’ is deleted.”; ?>
by Garth | May 8, 2018 | PHP
<?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 ‘” ....
by Garth | May 4, 2018 | PHP, Wordpress
// Custom Post 1 register_post_type( ‘courses’, array( ‘labels’ => array( ‘name’ => __( ‘Courses’ ), ‘singular_name’ => __( ‘Course’ ) ), ‘public’ => true,...
by Garth | May 3, 2018 | PHP, Wordpress
<?php echo do_shortcode(“[shortcode]”); ?>
by Garth | May 3, 2018 | PHP, Wordpress
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...