After googling and searching WordPress I cannot find a straight answer. How do I save the Permalink to a cookie so I can read it on another page.
Help!
After googling and searching WordPress I cannot find a straight answer. How do I save the Permalink to a cookie so I can read it on another page.
Help!
Figured it myself. In case there is someone else looking for this, here is my approach. Note - I’m not a PHP guy so this approach could potentially make a real programmer see red…
$page_url = get_permalink($post->ID);
$url_cookie = "lp_permalink";
setcookie($url_cookie, $page_url, time() + (86400 * 30), "/");
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.