69 posts
  • Has been part of the Envato Community for over 5 years
  • Has collected 100+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in United Kingdom
will1234craig says

Hi i need help with setting a cookie in wordpress if a user lands on a page in our wordpress site

then when they leave this page, we will use an if statement to show some different content on another page.

Only visitors to this cookie dropping page should get the cookie, all other visitors should not get any cookie,

if found this bit of code

http://wptheming.com/2011/04/set-a-cookie-in-wordpress/

but its for new visitors, i only want to set a cookie if they land on one page

by
by
by
by
by
by