If you have a caching solution, it is best to use a JavaScript triggered version of the age gate as this won’t be adversely affected by the cache, resulting in possible infinite challenges.

If you don’t have caching, the standard method is recommended.

Advanced reference

Option Description Since
Use uncachable version Uses the JavaScript implementation of the Age Gate to avoid caching issues 1.x.x
AJAX endpoint IN JS mode you can choose between calling to the admin-ajax or REST API  
JS Hooks Enable age_gate_restricted and age_gate_set_cookie filters available in JS files 2.3.0
Hook query string Optionally pass any query string parameters to JS version of age_gate_restricted filter 2.2.6
Write custom CSS to file Any custom CSS will be written to disk and enqueued by the plugin. Otherwise the CSS will be filtered and enqueued directly into the head 2.0.0
Custom CSS Any custom CSS you wish to use 2.0.0