How to Create Prominent Badges for Collections in Electro
The Electro theme makes it easy to create customizable prominent badges for your collections. This guide will teach you how to set up and configure prominent collection badges using the Electro theme’s metaobject and metafield functionality.
About Prominent Badge In Electro Theme
Prominent badges in the Electro theme allow you to highlight collections and draw attention to specific products. The badges are displayed prominently on collection cards.
The Electro theme enables full customization of collection badges through the use of metaobjects and metafields in Shopify. You can customize the color, text, and visibility of the badges.
How To Create Prominent Badges For Collections In Electro
To create a prominent badge, you will need to create a metaobject and a metafield. A metaobject is a custom data type that you can use to store information about your products and collections. A metafield is a custom field that can be attached to products and collections to store additional information.
To create a metaobject for a prominent badge, follow these steps:
Step 1: Creating Metaobject For Your Collection Badges
The first step in creating Electro theme prominent badges is to define a metaobject that will store the badge details:
- Go to Content > Metaobjects in your Shopify admin.
- Click Add definition to create a new metaobject.
- Name the metaobject “Badge“.
- Add two fields:
- A Color field named “Color” for the badge background
- A Single line text field named “Content” for the badge text
- Click Save.
This creates the template that will be used for your badge metaobject entries.
Step 2: Customizing Prominent Badges
- Go to Content > Metaobjects
- Click Add entry and select the “Badge” metaobject.
- In the Color field, set the desired background color for the badge.
- In Content, add the desired text.
- Click Save.
Step 3: Adding The Metafield To Collections
Now you need to attach the metaobject to collections:
- Go to Settings > Custom data > Metafields > Collections.
- Click Add definition to create a new metafield.
- Set the Name and Key to “badge“, Namespace to “collection“, and Type to “Metaobject“.
- In Reference, select the “Badge” metaobject you just created.
- Click Save.
This metafield allows you to assign badge entries to specific collections.
Step 4: Setting Badges For A Collection
To set a badge for a collection in the Electro theme:
- Edit the collection and scroll down to Metafields.
- Click the “Badge“.
- Choose the entry you have set up for the Metaobject in step 2.
- Click Save to apply the badge for the collection.
Step 5: Enabling Badges For The Collection Card
Finally, enable the badges:
- Go to Online Store > Themes > Theme Settings
- Scroll down to the Collection card.
- Check the “Enable prominent badges” option.
The badges will now display on your collection cards!
Following these steps allows full control over your Electro theme prominent collection badges. Stand out with custom-designed badges for your key product collections!
Frequently Asked Questions
How can I use the Prominent Badge for Collection in Electro? | Create Metaobject and Metafield |
Can I change the color for the Badge? | Yes |
Is it possible to add other text besides “New” to the Badge? | Yes |