|
/ Documentation /CartFlows/Developer Docs/ How and Where to Add Custom JS, CSS, and PHP Codes

How and Where to Add Custom JS, CSS, and PHP Codes

You may sometimes need to add custom JavaScript, CSS, or PHP code to your site for custom functionality or styling. Below are the methods to safely do this.

Use a Plugin (Recommended for Most Users)

For simplicity and safety, you can use a plugin that allows adding custom code without touching theme files. This works for JavaScript, CSS, and PHP.

We recommend:

These plugins let you manage your code snippets in a user-friendly way, and they remain active even after theme updates.

Add Custom JavaScript

CartFlows Funnels Only

Use the Custom Script tab inside each funnel or step setting. The script will only apply to that specific funnel or step.

Funnel / Step Custom Script

Add Custom CSS

Go to Appearance > Customize > Additional CSS and paste your CSS code.

Additional CSS Field

Add Custom PHP

Using a Child Theme

Add your PHP code inside the functions.php file of your child theme.

Child Theme's functions.php

Using a child theme ensures your custom code won’t be lost when updating the theme. If you’re not familiar with what a child theme is, refer to this article.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page