0

I want to create several pages in WordPress that will display TOS message. If user click "Agree" one time then the other pages shouldn't display the message again. I am using WordPress custom template page in the Child Theme folder.

floCoder
  • 421
  • 1
  • 7
  • 21

1 Answers1

1

The best way to do it is to surround the TOS language with a php if statement which checks for the existence of a cookie, maybe named 'seen_tos'. Then add a javascript function whch fires on the 'Agree' button click and saves a cookie using JavaScript, as shown here:

Set cookie and get cookie with JavaScript

Community
  • 1
  • 1
Yavor
  • 671
  • 3
  • 9