Sometimes, you need to extend your site using custom code. Toolset Types and Views plugins, available for download from your WPML account, allow you to add custom code from the WordPress admin. No need to edit PHP files or create child themes.
Recently, we added two complimentery plugins plugins, Types & Views Lite, to all WPML clients’ accounts. These two plugins let you build advanced WordPress sites without programming.
Why use Toolset to add custom code to your site?
Using Toolset to add custom code to your site brings some important benefits:
- Your custom code is separate from your theme. Updating or switching a theme will not impact your custom code. Also, there is no need to create a child theme just to add a custom code snippet.
- No need to edit the PHP files in your site to add custom code, you do it from the WordPress admin.
- Easily enable or disable your custom code by using the backend interface.
- Easily select where your code is run. This can be on the front-end, on the backend, or inside AJAX calls.
- Execution of your custom code is automatically checked by Toolset. Toolset will catch any major issues with your custom code. For example, it can prevent a fatal error caused by your code, simply by not executing it if an issue is detected.
Are you wondering how those code snippet actually look like and what you can do with them? If you are, be sure to take a look at some code snippets that we have created for you.
How to add custom code using Toolset
The best part is that it’s very easy to add custom code using Toolset.
After installing the Toolset Types and/or Views plugins go to the Toolset -> Settings page and click the Custom code tab. There, click the Add new button, define a slug for your custom code and enter the code.
When done click Save and close and activate the code snippet.
That’s it, your first custom code is ready to be used!
Find out more
You can learn more about this feature in the official Toolset documentation about adding custom code to your WordPress site.
It features a nice introduction to custom coding, detailed instructions for using the custom code feature in Toolset, and some useful snippets you can reuse on your sites.
What do you think?
Any thoughts or question? Leave us a comment and let us know if you find the custom code feature useful.