Title: Add Javascript to Age Gate Template
Last modified: September 30, 2020

---

# Add Javascript to Age Gate Template

 *  Resolved [bigskillet](https://wordpress.org/support/users/bigskillet/)
 * (@bigskillet)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/add-javascript-to-age-gate-template/)
 * We need to add a 3rd-party cookie consent bar to the bottom of the Age Gate template.
   Is that possible? Could we hack the plugin maybe, or is there a better way?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Phil](https://wordpress.org/support/users/philsbury/)
 * (@philsbury)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/add-javascript-to-age-gate-template/#post-13476544)
 * Hi [@bigskillet](https://wordpress.org/support/users/bigskillet/),
 * There’s a few ways to go on this. `wp_footer` still fires in the age gate template,
   so there’s that option.
 * There’s also a [filter](https://agegate.io/docs/hooks/filters/age_gate_after)(
   that really should be an action!) that you could tap into – just have to return
   the markup.
 * You could also add an “accept cookies” [form field](https://agegate.io/docs/guides/custom-form-fields)
   if you wanted.
 * Hope one of those helps.
 * Cheers
    Phil
 *  Thread Starter [bigskillet](https://wordpress.org/support/users/bigskillet/)
 * (@bigskillet)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/add-javascript-to-age-gate-template/#post-13476645)
 * I hacked the `public/partials/age-gate-public-display.php` and got it working,
   but realized my changes would be wiped out the next time the plugin updates.
 * I went ahead and used the custom field approach, adding the embed script instead
   of an input field.
 * Thanks for the quick response!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add Javascript to Age Gate Template’ is closed to new replies.

 * ![](https://ps.w.org/age-gate/assets/icon-256x256.png?rev=2783003)
 * [Age Gate](https://wordpress.org/plugins/age-gate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/age-gate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/age-gate/)
 * [Active Topics](https://wordpress.org/support/plugin/age-gate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/age-gate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/age-gate/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [templates](https://wordpress.org/support/topic-tag/templates/)

 * 2 replies
 * 2 participants
 * Last reply from: [bigskillet](https://wordpress.org/support/users/bigskillet/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/add-javascript-to-age-gate-template/#post-13476645)
 * Status: resolved