An open API service indexing awesome lists of open source software.

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.

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

---