# How to add PHP snippet

**URL:** <https://community.hivepress.io/t/how-to-add-php-snippet/8586>\
**Category:** HivePress\
**Created:** [December 3, 2023, 10:30pm UTC](https://community.hivepress.io/t/how-to-add-php-snippet/8586 "2023-12-03T22:30:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elpalado96](https://community.hivepress.io/user_avatar/community.hivepress.io/elpalado96/32/7555_2.png) [@elpalado96](https://community.hivepress.io/u/elpalado96)\
**Post date:** [December 3, 2023, 10:30pm UTC](https://community.hivepress.io/t/how-to-add-php-snippet/8586/1 "2023-12-03T22:30:04Z")

</div>

Hi, I have exactly the same enquiry as in this thread - [https://community.hivepress.io/t/social-links-whatsapp-hide-countries/2415](https://community.hivepress.io/t/social-links-whatsapp-hide-countries/2415)

I understand that I need to insert this piece of PHP, but I don’t quite understand where.  
Can you tell me the directory where to add this code?

I would be grateful if you can add the code from the last topic so that I can replace both Telegram and WhatsApp

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [December 5, 2023, 8:30am UTC](https://community.hivepress.io/t/how-to-add-php-snippet/8586/3 "2023-12-05T08:30:40Z")

</div>

Hi,

To add a PHP snippet, I recommend using the Code Snippets plugin, please check this doc [How to add custom code snippets - HivePress Help Center](https://help.hivepress.io/article/23-how-to-add-custom-code-snippets)

​I hope this is helpful to you.

---

<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:** [January 4, 2024, 8:31am UTC](https://community.hivepress.io/t/how-to-add-php-snippet/8586/4 "2024-01-04T08:31:13Z")

</div>

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