# How to add custom snippets?

**URL:** <https://community.hivepress.io/t/how-to-add-custom-snippets/17597>\
**Category:** HivePress\
**Tags:** code\
**Created:** [April 19, 2026, 8:50pm UTC](https://community.hivepress.io/t/how-to-add-custom-snippets/17597 "2026-04-19T20:50:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![obtrusive170](https://community.hivepress.io/letter_avatar_proxy/v4/letter/o/8dc957/32.png) [@obtrusive170](https://community.hivepress.io/u/obtrusive170)\
**Post date:** [April 19, 2026, 8:50pm UTC](https://community.hivepress.io/t/how-to-add-custom-snippets/17597/1 "2026-04-19T20:50:38Z")

</div>

Please how to use hook hivepress/v1/forms/user\_register to include custom code in HivePress as mentioned at [Add support for hCaptcha - #6 by GoVegan](https://community.hivepress.io/t/add-support-for-hcaptcha/9795/6) by @GoVegan @Ardain ? I will not use Google spyware on my site and need HCaptcha instead.

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [April 19, 2026, 8:50pm UTC](https://community.hivepress.io/t/how-to-add-custom-snippets/17597/2 "2026-04-19T20:50:38Z")

</div>

Thanks for your message — our team will reply shortly.

In the meantime, you can also get instant help from our [AI Assistant](https://www.chatbase.co/PdfFucPZ0vUmh3dfM-oe1/help), familiar with all the docs and solutions we’ve shared over the years.

---

<div class="post-metadata">

**Author:** ![ChrisB](https://community.hivepress.io/user_avatar/community.hivepress.io/chrisb/32/14185_2.png) [@ChrisB](https://community.hivepress.io/u/ChrisB)\
**Post date:** [April 20, 2026, 10:24am UTC](https://community.hivepress.io/t/how-to-add-custom-snippets/17597/3 "2026-04-20T10:24:29Z")

</div>

Hi @obtrusive170,

Please find my reply to your similar post in another topic [here](https://community.hivepress.io/t/add-support-for-hcaptcha/9795/10).

Cheers,  
Chris ✌

---

<div class="post-metadata">

**Author:** ![obtrusive170](https://community.hivepress.io/letter_avatar_proxy/v4/letter/o/8dc957/32.png) [@obtrusive170](https://community.hivepress.io/u/obtrusive170)\
**Post date:** [April 22, 2026, 12:08pm UTC](https://community.hivepress.io/t/how-to-add-custom-snippets/17597/4 "2026-04-22T12:08:07Z")

</div>

Thanks for mentioning [Code Snippets – WordPress plugin | WordPress.org](https://wordpress.org/plugins/code-snippets/) in that topic. After installing that plugin, I go to Snippets \> Add New \> (PHP is selected by default)

Paste the code from that topic, starting “// Add hCaptcha to user register form”.

“Save and Activate” button.

After no cache page reload at [https://my.site/account/login/?redirect=https%253A%252F%25my.site%252Fsubmit-listing%252F#user\_register\_modal](https://my.site/account/login/?redirect=https%253A%252F%25my.site%252Fsubmit-listing%252F#user_register_modal)

(registration form (email, password)), i am still unable to see the hcaptcha. I think that the code is not complete. Please post step by step instructions (ideally as i have already asked by updating existing post instead of bumping the topic).

---

<div class="post-metadata">

**Author:** ![kseniia](https://community.hivepress.io/user_avatar/community.hivepress.io/kseniia/32/13513_2.png) [@kseniia](https://community.hivepress.io/u/kseniia)\
**Post date:** [April 22, 2026, 1:14pm UTC](https://community.hivepress.io/t/how-to-add-custom-snippets/17597/5 "2026-04-22T13:14:30Z")

</div>

Hi,

Please make sure that you’ve activated and configured the hCaptcha plugin: [hCaptcha for WP – WordPress plugin | WordPress.org](https://wordpress.org/plugins/hcaptcha-for-forms-and-more/#description). Once the plugin is configured, add the PHP snippet to the Code Snippets plugin.

I’ve tested the snippet locally, and the captcha appears as expected: [Enabling hCapthca | Loom](https://www.loom.com/share/8c8b1972bd7846a19ca2472e0aceacd4).

P.S. Please note that the suggested solution was provided by a community member and is not an official integration. Community members, including Chris, kindly share their experience and help others, but such solutions may require additional adjustments depending on your setup.

---

<div class="post-metadata">

**Author:** ![obtrusive170](https://community.hivepress.io/letter_avatar_proxy/v4/letter/o/8dc957/32.png) [@obtrusive170](https://community.hivepress.io/u/obtrusive170)\
**Post date:** [April 22, 2026, 6:35pm UTC](https://community.hivepress.io/t/how-to-add-custom-snippets/17597/6 "2026-04-22T18:35:48Z")

</div>

> [@kseniia](#):
>
> hCaptcha

Thanks, so I have added plugin named “hCaptcha for WP”, and in its wizard, selected an option to apply configuration automatically. Added hcaptcha sitekey, secret and “Check” button and then “Save” button on the bottom of the page. Also enabled some forms protection on the Integrations tab.

I can now see the registration form of HivePress having hCaptcha. Thank you for help kseniia.

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [May 22, 2026, 6:36pm UTC](https://community.hivepress.io/t/how-to-add-custom-snippets/17597/7 "2026-05-22T18:36:33Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
