A collection of WordPress PHP snippets, documented one page at a time.
Docs: https://managingwp.github.io/wordpress-code-snippets/
50 snippets in 21 categories, one page each.
| Section | Where |
|---|---|
| Snippet catalogue | https://managingwp.github.io/wordpress-code-snippets/ |
| Install a snippet | https://managingwp.github.io/wordpress-code-snippets/getting-started/install-a-snippet |
| Snippet headers | https://managingwp.github.io/wordpress-code-snippets/reference/snippet-headers |
| Add a snippet | https://managingwp.github.io/wordpress-code-snippets/contributing/add-a-snippet |
| Changelog | https://managingwp.github.io/wordpress-code-snippets/history/changelog |
- Open the docs and pick a snippet.
- Copy its
.phpfile into your site:mu-plugin→wp-content/mu-plugins/plugin→wp-content/plugins/<name>/snippet→ WP Codebox or another snippet manager
- Read the snippet page before deploying: it lists the version, the type and the status.
| Status | Meaning |
|---|---|
| ✅ Complete | Verified working. |
| 🚧 WIP | Partly working, expect changes. |
| ❌ Broken | Known broken, kept for reference. |
| ❓ Unknown | Not verified, or the header has no status. |
Every snippet carries a header (Plugin Name, Description, Version, Type,
Status). Add or change a snippet, then regenerate the docs and commit both:
./generate-readme.shCommit messages use conventional commits. Full guide: https://managingwp.github.io/wordpress-code-snippets/contributing/add-a-snippet