NewThe WP Tutoring WordPress training platform is live — on demand video courses and interactive WordPress lessons. Free account, no card.Start free
Helping site owners learn WordPress since 2012 · (844) WP-TUTOR
Plugins course · Beginner

Code Snippets: WordPress Plugin Tutorial

FreeLesson 1 of 3 · Add Custom Code Safely with the Code Snippets Plugin

Code Snippets tutorial: add custom PHP and site tweaks to WordPress safely, without editing theme files. Each snippet gets its own on/off switch.

  • 3 lessons
  • 15 min
  • Free to watch
  • Updated Oct 27, 2026

All 3 lessons free · no card · we email you a sign-in link

Own a site with a team? Get the free training-videos plugin for your WordPress dashboard →

WordPress tutors since 2012Recorded click by click on a real WordPress siteCaptions and chapters on every lessonNo card, no trial clock

Watch all 3 lessons free

All 3 lessons, with captions and chapters. Pick a lesson to play it at the top of the page, or open the playlist on YouTube →

  1. 1Add Custom Code Safely with the Code Snippets Plugin4 min
    From the lesson

    “Plenty of tutorials tell you to open one of your theme's code files and paste something in. The trouble is, that file is fragile: a single typo can knock your whole site down, and the very next theme update quietly wipes out whatever you added. The better way is a snippets plugin, which keeps each piece of code in its own safe, labelled box.” Watch the full lesson →

  2. 2Create a Snippet: Disable XML-RPC in WordPress5 min
    From the lesson

    “In this lesson you'll meet your very first snippet, learn what every part of it does, and switch it on with confidence. Our example switches off XML-RPC, an old remote-access door most sites never use and a common target for attacks. You'll tour every part of the snippet editor and see exactly how a snippet is put together.” Watch the full lesson →

  3. 3Deactivate, Clone, and Export Code Snippets Safely6 min
    From the lesson

    “Before we touch the screen, let's see what safe snippet management really means. Turning a snippet off stops it running right away, with nothing left behind. Make a copy before you tinker, so the working original stays safe. Exporting saves a small file you can carry to any other site. Trashing only removes the stored code; the rest of your site is untouched.” Watch the full lesson →

Following along on your own site and stuck on something the video doesn't cover? Book a WordPress tutor — a live session on your own website, $85 an hour.

Free course
Take Code Snippets free
  • All 3 lessons, in order
  • Written steps beside every video
  • Your place saved between visits

All 3 lessons free · no card · we email you a sign-in link

Code Snippets is a free WordPress plugin that lets you add custom PHP and handy site tweaks without ever editing your theme's files. This short course shows why that's safer, how the snippet library works, and how to add and manage your own tweaks with an on/off switch for each one. You'll come away able to extend WordPress without the fragile copy-into-theme approach.

What you'll learn

Countless tutorials tell you to paste code into a theme file, where one typo can take your site down and the next update quietly erases your work. Learning how to use Code Snippets removes that risk: each tweak lives in its own labelled record that survives theme and WordPress updates and can be switched off in a click. After this course you'll be able to add, organize, and safely manage custom PHP and site tweaks, and undo any change instantly if something misbehaves. It's the sane way to extend WordPress without touching core files.

Inside the course

  • Why Snippets? Touring the Library and Activating Your First One
  • Creating Your First Snippet
  • Managing Snippets Safely: Deactivate, Clone, Export & Good Habits

Who this course is for

This is for confident beginners who don't mind following a tutorial that includes a bit of code, and for anyone who has been warned against editing theme files directly. You don't need to write PHP from scratch. If you're brand new to WordPress, our Fundamentals course is a better place to start.

Free WordPress plugin

Training videos inside your own dashboard

Dashboard Training Videos puts all of WordPress Fundamentals in wp-admin, free, for everyone who logs in to your site. Type what you need to do and the video starts at the answer. Pro adds every other course for $39 per site / year.

Get the free plugin →
One-to-one, on your site

Rather be shown on your own website?

“Grant walked me through, step-by-step, showing me how to use the many features of WordPress. I’m so much more confident now. If you need tutoring, Grant is your man.”Lauren Yingling, Webmaster, The Millennial Legacy · tutoring client
Book a WordPress tutor →

Frequently asked questions

Is Code Snippets free?
Yes. The plugin is free, and this course is free to watch with a free WP Tutoring account. A pro version exists, but the essentials covered here work in the free plugin.
Do I need to know PHP to use Code Snippets?
Not to get started. Many people paste in snippets they've been given and switch them on. The course shows how to add and manage them safely even if you don't write PHP yourself.
Is Code Snippets safer than editing theme files?
Yes. Snippets stay put when your theme or WordPress updates, each has its own on/off switch, and you can disable a problem one in a click instead of hunting through code.

Take Code Snippets free

  • All 3 lessons, in order
  • Written steps beside every video
  • Your place saved between visits

All 3 lessons free · no card · we email you a sign-in link