
The “functions.php” file should now open in the editor and you can add your snippet before saving the file. The menu may look different to the above depending on what theme you are using. From here choose the “functions.php” file To make the change via the dashboard go to “Appearance -> Editor”, this should open the editor, and you should see a theme files menu on the right-hand side of the screen. We considered not including this method in the article at all because it’s so dangerous but thought it was better to explain it rather than just ignoring it. It is quick, but it can also lead to your site being taken offline.
#GHOST IO CODE SNIPPIT DOWNLOAD#
Once you have located the file then you can either edit it via the FTP client or download it to your machine, edit it (we’d strongly recommend backing the file up first) and then upload the changed file back to your server.īefore explaining this method, we really should point out that we strongly advise against using it. In the screenshot above you can see how I’ve accessed the “storefront” theme folder and found the functions.php file. To add a snippet to your site you should just need to append it to the end of the “functions.php” file. From here choose the folder that corresponds to the theme name you are currently running on your site. Once you have accessed your site via FTP use your FTP client to access the “wp-content\themes\” folder within your website.

Use an FTP client such as FileZilla to connect to your website, to do this you’ll need an FTP URL, username, and password, these should all be available from your hosting company.
#GHOST IO CODE SNIPPIT HOW TO#
This is the safest way to make a change using this method, here’s how to do it. There are two ways to make a change via this method This may well be the most tempting way to add a snippet, it’s potentially very quick, but it’s also probably the most unsafe method both in terms of keeping the functionally you add and also in terms of breaking your site. Using the functions.php File in Your Theme using the functions.php file in your child themeįor each method, we’ll detail how it’s done and then look at its pros and cons.using the functions.php file in your theme.


Click here for more details about the "Learning WooCommerce Development By Example" book
