PeachPay

Supercharging WooCommerce Checkout & Payments

SPONSORED

Where to Put Custom Code for Your Website in WordPress

Whenever you need to add custom code to your WordPress site, the typical recommendation is to put it in the theme's functions.php file. I don't like doing that as it's easy to forget to copy-paste that code to the new theme when it's time to a refresh. Moreover, if done in that manner, you don't have the ability to switch on or off certain functions. The solution for me has been the following plugins:.
Table of Contents

Whenever you need to add custom code to your WordPress site, the typical recommendation is to put it in the theme’s functions.php file. I don’t like doing that as it’s easy to forget to copy-paste that code to the new theme when it’s time to a refresh.

Moreover, if done in that manner, you don’t have the ability to switch on or off certain functions.

The solution for me has been the following plugins:

Pluginception – Lets you create plugins from within the WordPress dashboard. This is useful when I just want to create one plugin to dump all the custom functionality into and have it protected whenever I change themes.

Code Snippets – An excellent plugin that lets you create snippets of code as functions that can be switched on or off at will, in the same way as you would with normal plugins.

Do you like these solutions?

Jean Galea
Jean Galea
Jean Galea is an investor, entrepreneur, and blogger. He is the founder of WP Mayor, the plugins WP RSS Aggregator and Spotlight, as well as the Mastermind.fm podcast. His personal blog can be found at jeangalea.com.

Consider sharing this post so others can find it:

Stay in the know on the latest and greatest products and services in WordPress. We'll send you one email every week with new and trending tutorials and reviews.

4 Responses

Leave a Reply

Your email address will not be published.

Haven't found an answer to your question? Ask us about it.
Although we publish new posts every week, we might not be answering your questions. Recommend a topic and we'll do our best to cover it in one of our next posts.
From hosting plans to WooCommerce plugins and backup services, we have put together a collection of exclusive coupons and deals!
WP Mayor_Icon_white
WP Mayor Team

Get the latest reviews & tutorials, just like this one, curated in your inbox.