FunnelKit Documentation
Get unstuck with our helpful reference material

How To Add a Custom Code Snippet To Your WordPress Site?

Adding custom code snippets to your WordPress site can help you extend functionality without needing a full plugin; however, how you add the code matters for both safety and maintainability.

Note: You can add code to your child theme’s functions.php file, but it’s risky; errors can break your site, and changes may be lost or hard to manage.

Experts recommend using a WordPress plugin because these are safe and won’t break your site. 

To use this plugin to add a custom code snippet to your site, follow these steps: 

Step 1: Install and activate the WPCode plugin 

At FunnelKit, we recommend using the WPCode plugin (formerly Insert Headers and Footers).

You can easily install and activate the plugin from the WordPress dashboard. Go to Plugins ⇒ Add Plugin, search for WPCode, then install and activate the plugin. 

install and activate wpcode

Step 2: Add the code snippet

Now go to Code Snippets ⇒ + Add Snippet. Then hit the option +Add Custom Snippet. 

Add Custom Code

Next, choose the code type (PHP, JavaScript, HTML, CSS, etc.). To add custom functionality to FunnelKit plugins, you'll typically need to select PHP.

Select php snippet

After that, name the custom code snippet and paste the custom code in the Code Preview section. 

Name custom snippet and add code

Step 3: Activate and save the snippet 

After adding the custom code, make sure to activate the snippet and hit “Save Snippet.”

And that’s it. You can follow the same process to add any custom code to your site. 

Ready to Transform Your Store?

Join 38,315+ successful store owners who trust FunnelKit to power their businesses.
Conversion Optimized Checkout Pages
Increase Revenue with Smart Upsells
Capture Emails & Recover Abandoned Carts
Automate Winbacks & Repeat Sales
880+ 5 star reviews on WordPress.org
Transform your store to power your business with FunnelKit
880+
 Reviews
4.9
🚀 Maximize Your Profit with FunnelKit – Highest Rated with 880+ 5-Star Reviews
Get Started
chevron-downarrow-right