Creating a plugin for custom code

The Quform WordPress v2 documentation is not yet finished. Please post on the forums if you have any questions in the mean time.

Click here to visit the complete documentation for Quform 1.x

In many of the guides we ask you to add code to your theme functions.php file, this can mean that when you update your theme the changes are wiped out (unless you are using a Child Theme – we recommend doing so).

Another way to add the custom code to your site is to create a new plugin for it. It might sound complicated but it’s not. Using this method means the code will not be affected by theme updates and another advantage is that you can simply deactivate the plugin to stop the code being run. Create an empty text file and call it quform-custom-code.php and add this code inside the file:

1
2
3
4
5
6
7
8
9
<?php
 
/*
 * Plugin Name: Quform Custom Code
 * Description: Custom code for Quform.
 * Version: 1.0
 */
 
// Paste in your custom code below
<?php

/*
 * Plugin Name: Quform Custom Code
 * Description: Custom code for Quform.
 * Version: 1.0
 */

// Paste in your custom code below

On line 10 paste in the code from the guide you were following.

Using FTP software such as FileZilla, connect to your web server and go to the wp-content/plugins folder. Right click and choose Create directory and name it quform-custom-code and upload the quform-custom-code.php file into this newly created folder.

Then to go the Plugins page within WordPress and activate the plugin Quform Custom Code. That's it!

Still having trouble? Head over to the forums.

Forums