• I would like to set up a banner using HTML code in the “Additional content” section of the “Message” item, but it disappears when I press “Save Settings”.
    Is it not possible to enter HTML code in “Additional content”?
    I think I was able to input it when I started using Age gate.

    Please tell me how to install a banner on Age gate.

Viewing 1 replies (of 1 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @yuuki0nyaa,

    You can’t add HTML directly into the additional content, that was change around v3.0 I think as it was problematic from a XSS perspective.

    There’s a couple of ways you can get round it;

    Use a shortcode – you can create a shortcode to display what you want and add it into the content field, see this topic for more info.

    Use an action – the action age_gate/additional is called where the additional content goes, but outside it’s content, so something like:

    add_action('age_gate/additional', function() {
        echo '<div>My html content</div>';
    })

    Or lastly you can copy the view file from age-gate/src/Resources/views/partials/decoration/content/php into <your theme>/age-gate/partials/decoration/content/php and add whatever you want to if and the plugin will use your file instead of the plugin version.

    Hope that helps

    Thanks
    Phil

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.