https://github.com/juansebsol/wordpress-snippet-vault
This is your developer friendly toolkit of clean, powerful code snippets that help you extend WordPress and WooCommerce without bloated premium plugins.
https://github.com/juansebsol/wordpress-snippet-vault
snippets-collection wordpress wordpress-development
Last synced: about 2 months ago
JSON representation
This is your developer friendly toolkit of clean, powerful code snippets that help you extend WordPress and WooCommerce without bloated premium plugins.
- Host: GitHub
- URL: https://github.com/juansebsol/wordpress-snippet-vault
- Owner: juansebsol
- Created: 2025-07-13T19:12:36.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-13T20:38:55.000Z (12 months ago)
- Last Synced: 2025-07-13T21:23:36.207Z (12 months ago)
- Topics: snippets-collection, wordpress, wordpress-development
- Language: PHP
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Security: security-snippets/.gitkeep
Awesome Lists containing this project
README
# WordPress Snippet Vault — Power Without Plugins
Tired of hitting paywalls for simple WordPress features?
This is your **developer-friendly toolkit** of clean, powerful code snippets that help you **extend WordPress and WooCommerce** — without bloated premium plugins.
All snippets are:
- Easy to understand
- Fully commented
- Ready to copy-paste
- Built to be extended
---
## What You’ll Find
- WooCommerce My Account custom tabs
- Role-gated features and menus
- Custom user role creation
- Shortcode-ready form integrations (Fluent Forms, etc.)
- Clean, plugin-free solutions for everyday problems
---
## How to Use
1. **Install the free [Code Snippets](https://wordpress.org/plugins/code-snippets/)** plugin.
2. Go to **Snippets → Add New**
3. Give it a title and paste the code from this repo.
4. Adjust IDs, slugs, or shortcodes as needed.
5. Save it, then go to **Settings → Permalinks → Re-save** (important!).
6. You’re done
---
## Example Snippets
- `woocommerce-support-tab.php`
Adds a “Support” tab in My Account with shortcode support. Includes support for shortcodes (e.g., contact forms, dashboards).
- `show-tab-by-role.php`
Only show a tab for specific roles like `hoster`, `admin`, etc.
- `create-hoster-role.php`
Create a new custom user role with customer capabilities (and more if needed).
---
## Contributions Welcome
Got a clean snippet? Open a PR. All snippets must:
- Work with current WP +/or WooCommerce versions
- Be well-commented
- Solve a *real* problem
---