Home / Documentation / Version 3 / Styling / Adding custom class names and attributes
Adding custom class names and attributes
In version 3 you can easily add classes or other attributes to Age Gate elements, for example:
functions.php
age_gate_add_attribute('age-gate-loader', 'class', 'my-custom-class');
age_gate_add_attribute('age-gate-loader', 'aria-hidden', 'true');
Disallowed attributes
The following attributes are not allowed through the age_gate_add_attribute
function to prevent unexpected results:
- type
- value
- pattern
- name
- inputmode
- autocomplete
- id
- for
- minlength
- maxlength
- required
- data-error-field
- method
- action