โ๏ธ Snippets Manager โ Better Find and Replace
This feature is exclusively accessible through the PRO-PRO and above plan.
The Snippets Manager allows you to load, manage, and apply custom CSS or JavaScript code snippets as physical filesโresulting in faster performance and avoiding potential conflicts with your theme or plugins.
๐ How to Access the Snippets Manager
- Go to your WordPress admin dashboard.
- Navigate to Find & Replace > Snippets Manager.
- You will see the Snippets Manager interface with a list of existing snippets and the option to add a new one.
๐ Creating a New Snippet
To add a custom snippet:
โค Step 1: Click “Create New Snippet”
This will open the snippet creation form where all fields are required.
โค Step 2: Fill Out the Fields
๐ค Snippet Name
- Provide a descriptive name for your snippet.
- This name will generate the physical file name.
- Example: entering
frontend-banner
for a CSS snippet will create a file:
wp-content/uploads/bfar-pro/snippets/CSS/frontend-banner.css
๐งฉ Snippet Type
- Choose between:
CSS
JavaScript
- The system will generate the appropriate
.css
or.js
file.
๐ง Snippet Content
- Enter your actual CSS or JS code.
- This content is what will be loaded on the front end.
๐ฏ Advanced Filters (Optional)
You can limit where the snippet gets applied:
๐ Filter by Pages
- Enter specific page titles (e.g.,
Checkout
,Home
) where the snippet should be loaded. - Useful for targeting only key areas without affecting the whole site.
๐ Filter by Posts
- Enter specific post titles where the snippet should be applied.
- Snippet will only appear on individual post pages matching the title.
โ ๏ธ You must enter at least one character for filters to apply.
๐พ Saving the Snippet
Once all fields are completed:
- Click the “Save Snippet” button.
- The snippet will be stored as a physical file under:
wp-content/uploads/bfar-pro/snippets/CSS/
wp-content/uploads/bfar-pro/snippets/JavaScript/
- It will automatically be enqueued on the front end where applicable.
๐พ All Snippets
You can view all created snippets along with the locations where they have been applied. From this section, you can also update or delete existing snippets as needed.
๐ ๏ธ Recovering from Broken Snippets
If a snippet causes layout issues or breaks the site:
- Use FTP or File Manager to access: wp-content/uploads/bfar-pro/snippets/
- Navigate to the appropriate folder (CSS or JavaScript).
- Rename or delete the problematic file.
- Reload your site โ the issue should resolve immediately.
wp-content/uploads/bfar-pro/snippets/
๐งช Always test your snippets in a staging environment before deploying to production.
๐ก Pro Tips
- Keep snippet names short and descriptive.
- Use CSS snippets to fix layout issues or add quick styling.
- Use JS snippets to enhance user interaction or front-end behavior.
Check the pro version of Better Find And Replace, Pro version will help you to do your job very smoothly.