## Is it possible to load recaptcha script only in url with fragment identifier (#)?

Question

I have tried various snippets, like this:

<?php

but it doesn’t work in #register section with hash, I also tried with if (window.location.hash == "#register")