Adding Custom Functions to WordPress – The Right Way

WordPress has a huge community, due to which a lot of plugins and themes are available. If you are desiring a feature for your WordPress website, chances are there is already a plugin available for the same.

But there can be certain situations when a dedicated plugin is not available. In such cases, you might need to write custom functions. These functions are nothing but a few lines of script that you can integrate into your website to achieve certain functionalities. Just like plugins, there are a lot of ready-made custom functions available across the internet. For example, you can check out the WordPress scripts section on our website.

However, one major confusion that new developers face is, where to add custom functions in WordPress.

Most of the time, you will see suggestions like add the code to your functions.php. In my views, it is not the ideal practice, because if you update or change your theme, the old function.php file will be overwritten by a new one and you will lose the function.

The best way is to use custom functions plugin. Below are the two good plugins for adding custom functions to your WordPress website.

Leave a Reply

Your email address will not be published. Required fields are marked *