A small collection of beginner-friendly WordPress snippets organized by category.
| Snippet | Category | File |
|---|---|---|
| Current Year Shortcode | Shortcodes | current-year-shortcode/current-year-shortcode.php |
| Change Login Logo to Site Logo | Admin | change-login-logo/change-login-logo.php |
| Disable XML-RPC | Security | disable-xml-rpc/disable-xml-rpc.php |
- Open the folder of the snippet you want.
- Copy the PHP code.
- Add it using a code snippets plugin, a child theme's
functions.php, or a custom functionality plugin. - Activate and test it on a WordPress staging site before using it on a live website.
When pasting into some WordPress code snippet plugins, you may need to remove the opening <?php tag.
When saving as a real .php file in GitHub, keep the opening <?php tag.