This repository contains a collection of custom code snippets designed to enhance and automate WordPress sites running FluentCommunity, Paid Memberships Pro, and related tools.
These scripts solve real-world problems for site admins, from auto-generating usernames to setting default notification preferences for new spaces. All snippets are safe to copy and paste directly into your WordPress site’s functions.php file (preferably inside a child theme — more on that below).
- ✅ Automatically assign notification preferences when a new space is created in FluentCommunity
- ✅ Auto-fill usernames in the
FirstName.LastNameformat on checkout - ✅ Default notification settings for new users
- ✅ Miscellaneous admin automations and fixes
These snippets are intended to be copy-pasted into your WordPress theme’s
functions.phpfile.
To avoid losing your changes when your theme updates, always use a child theme.
A child theme is a WordPress theme that inherits the functionality and styling of another theme (the “parent”), and allows you to safely make customizations.
You can create one by following this guide:
👉 WordPress: How to Create a Child Theme
Or use a plugin like:
Via WordPress dashboard:
- Go to Appearance > Theme File Editor
- Choose your child theme
- Click on
functions.phpin the right-hand sidebar
Or via FTP/file manager:
- Navigate to:
/wp-content/themes/your-child-theme/functions.php
Save a copy of your current functions.php before making changes.
Open the file from this repo that matches what you need and copy the code.
Paste the code at the bottom of functions.php — make sure it’s inside the PHP block and before any closing ?> tag, if present.
- Click Update File (in the WordPress editor), or
- Save/upload the file via FTP
That’s it! Your custom functionality is now live.