Your privacy choices

We use cookies to see how the site is used and, with Google and Meta, to measure our ads. Nothing is set until you choose. You can change your choice at any time under Cookie settings.

Privacy Policy

We use cookies to see how the site is used and, with Google and Meta, to measure our ads. You can change your choice at any time under Your Privacy Choices.

Your privacy choices

Choose which cookies we may use. Your choice applies on every page and lasts 12 months.

Your opt-out preference signal has been honored. Advertising stays off while your browser sends it.

NecessaryKeeps the site working: your privacy choice here, the language you are reading in, the documentation search, and Cloudflare's protection of the site.
Always on
Google Analytics and Cloudflare Web Analytics, and WooCommerce's own record of the page your visit started on: which pages are read, how the site is used, and which of them lead to an order.
Google Ads and the Meta pixel: measuring and improving our ads, including on other sites.
ThriveDesk, which runs the live chat on our support page. It is run by another company and stores an identifier in your browser.
Privacy Policy

Add PHP Code Guide | Bright Plugins Docs

1 min read Updated April 20, 2026 By the Bright Plugins team

Get Event Manager Pro

Occasionally, normally due to ‘filters’, you will need to add some snippets of custom PHP to get the desired results.

Using Code Snippet Plugin

The easiest way for less technical webmasters is to use a code snippet plugin.

We recommend WP Code plugin and publish all our code snippets on the WP Code Snippet Library.

Back to Code

Create a custom code plugin

It might sound daunting writing a plugin but it is not that hard. Find your wp-content/plugins directory and create a subfolder with any name you fancy, e.g. wp-content/plugins/my-custom-code and in that folder create a file called index.php and add the following code:

Add your custom code to the file, save and then go to plugins and activate.

Back to Code

Updated on April 20, 2026 · Need help? Open a support ticket