All Collections
Build My Storefront
Advanced Site Customization
Change common terms `Author`, `Category` in the Search filters
Change common terms `Author`, `Category` in the Search filters
Updated over a week ago

Note: The following article requires you to be on the Uscreen Plus plan.

If you want to rename Author or Category terms in the filters in the Catalog, Category, and Author page, this can be achieved using custom code. the workaround works for any locale (not only English).

Result example – Author -> Coach, Category -> Workout

Catalog page

Category page

Implementation

Important: Before you begin, make sure you make a backup of your theme. We cannot help restore a previous version if you attempt this custom code change and something goes wrong.

1. Go to the Website tab: https://www.uscreen.io/bullet/website

2. Click the 3-button menu and select Checkout Snippet

3. Navigate to the Head Code Snippet area

To replace a term, you should add a new term between quotation marks.

Example:

const newFilterAuthorLabel = "Coach";
const newFilterCategoryLabel = "Workout";

To replace only Author term

const newFilterAuthorLabel = "Coach";
const newFilterCategoryLabel = "";

To replace only Category term

const newFilterAuthorLabel = "";
const newFilterCategoryLabel = "Workout";

4. Copy the code below, replace the terms, and insert the code in Head Code Snippet

<script>
/* Change terms here */
const newFilterAuthorLabel = "";
const newFilterCategoryLabel = "";

/*
###############################
# Change the terms in the Filters
# ! Not recommended to change the code below !
###############################
*/

function replaceAuthor(newFilterAuthorLabel) {
// replace author
const authorFilter = document.querySelector('[for="author_id"]');
if (authorFilter && newFilterAuthorLabel) {
authorFilter.innerText = newFilterAuthorLabel
}
}

function replaceCategory(newFilterCategoryLabel) {
// replace category
const categoryFilter = document.querySelector('[for="category_id"]');
if (categoryFilter && newFilterCategoryLabel) {
categoryFilter.innerText = newFilterCategoryLabel
}
}

document.addEventListener('turbo:load', function (e) {
replaceAuthor(newFilterAuthorLabel)
replaceCategory(newFilterCategoryLabel)
})
</script>

5. Click Save changes

6. Changes might not reflect immediately due to CDN caching; you can also try clearing your browser cache.

NOTE:

This is a custom code suggestion and might only work in some cases, as this could be limited by the existing customizations applied to your page. If you have difficulty implementing this, we recommend consulting your developer or hiring one to assist you to ensure your customizations do not break. Our support team is unable to assist you with implementing custom coding.

⚠️ The code editor, code snippets, and custom HTML blocks do not affect native apps. To learn more about native apps customization, please check this help guide.

Did this answer your question?