hCaptcha script loaded in a page that does not have contact form
-
Hi,
Please check the source code of this page (please check the page link section), and do a search with “hcaptcha”, you will notice all the stuff related to the plugin. According to my knowledge, these things are not meant to be loaded on every page, except for the involved pages such as the contact page (when the hCaptcha is enabled on the contact form).
I even have this code
function hcap_block_inline_styles() {
if ( is_page( 'contact' ) ) {
return;
}
remove_action( 'wp_head', [ hcaptcha(), 'print_inline_styles' ] );
}
add_action( 'wp_head', 'hcap_block_inline_styles', 0 );Even with this code, you can see that there are some hCaptcha stuff loaded on other pages.
Please tell me how to prevent hCaptcha to be loaded on other pages? My purpose is to only load the scripts and related stuff only on the contact form page. Plus, I use the plugin on admin login and lost password pages.
Looking forward to your reply. Thank you in advance.
My best regards,
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.