Solved

Metafield Text - Is it possible to change its appearance (e.g. Bold, Italic)

solosglasses
Visitor
3 0 0

As stated in the topic, does anyone know is it possible to change meta field data text appearance? 

Screenshot 2022-08-11 at 5.17.59 PM.png

 

For example, I would like to bold the Recommended Face Size content on the product page but this text is here in the dynamic meta fields.

 

Thanks

Accepted Solution (1)

Ahsan_ANC
Shopify Partner
1362 246 312

This is an accepted solution.

plz use the bold/strong tags on the page where this field will be shown

 

<strong> metafield here </strong>
Contact for any custom design? Skype : ahsananc
>Was your question answered? Mark it as an Accepted Solution!
Feel Free to Contact Me at my Email: anc2277@gmail.com


To enhance and customize Shopify search and filter, I use Boost Product Filter & Search

View solution in original post

Replies 21 (21)

Ahsan_ANC
Shopify Partner
1362 246 312

This is an accepted solution.

plz use the bold/strong tags on the page where this field will be shown

 

<strong> metafield here </strong>
Contact for any custom design? Skype : ahsananc
>Was your question answered? Mark it as an Accepted Solution!
Feel Free to Contact Me at my Email: anc2277@gmail.com


To enhance and customize Shopify search and filter, I use Boost Product Filter & Search
solosglasses
Visitor
3 0 0

Thank you!

sweetbuddie
Explorer
51 1 19

Hi where dose this code go please i need bold text in meta fields multi line

Ahsan_ANC
Shopify Partner
1362 246 312

Hi @sweetbuddie  where do you want to show the meta field?

Contact for any custom design? Skype : ahsananc
>Was your question answered? Mark it as an Accepted Solution!
Feel Free to Contact Me at my Email: anc2277@gmail.com


To enhance and customize Shopify search and filter, I use Boost Product Filter & Search
sweetbuddie
Explorer
51 1 19

product page please

Ahsan_ANC
Shopify Partner
1362 246 312

Screenshot 2022-10-21 214642.png

Contact for any custom design? Skype : ahsananc
>Was your question answered? Mark it as an Accepted Solution!
Feel Free to Contact Me at my Email: anc2277@gmail.com


To enhance and customize Shopify search and filter, I use Boost Product Filter & Search
sweetbuddie
Explorer
51 1 19

i need some text in bold it will differ between different products as allergy ingredients have to be in bold by law

Ahsan_ANC
Shopify Partner
1362 246 312

please share some data so I can have a look at which type of data it is and how it will look.

Contact for any custom design? Skype : ahsananc
>Was your question answered? Mark it as an Accepted Solution!
Feel Free to Contact Me at my Email: anc2277@gmail.com


To enhance and customize Shopify search and filter, I use Boost Product Filter & Search
sweetbuddie
Explorer
51 1 19

a1.JPGCaptureaa.JPGIngredients

For allergens please see ingredients listed in bold.

Sugar, Glucose Fructose Syrup, Invert Sugar Syrup, Wheat Flour, Corn Starch, Vegetable Fat (Palm), Acids (Malic Acid, Citric Acid), Humectant (Glycerol) Potato Stach, Maltodextrin, Flavouring, Thickening Agent (Arabic Gum), Acidity Regulator (Potassium Citrates), Salt, , Fruit and Vegetable Concentrates (Carrot, Blackcurrant).Colour (E120)

 

an example of a products ingredients tab i need with WHEAT in bold

Ahsan_ANC
Shopify Partner
1362 246 312

HI @sweetbuddie please follow this guide carefully. It's a little bit tricky. First, go to the product editor, and in the meta-field add the ingredients. now for words you want to show as bold, wrap them around with pipeline ( | ) as shown in the screenshot below.

Screenshot 2022-10-23 231143.png

  

 

 

Now go to the theme editor and open the file 'main-product.liquid' in the sections folder. now replace the code highlighted in the below picture with the new code below.

 

Screenshot 2022-10-23 232420.png

 

 

code

 

 

 

 {% if block.settings.heading contains 'Ingredients' %}
              {% assign beatles = block.settings.content | split: "|" %}
               {% for member in beatles %}
                  {% assign value = forloop.index | modulo:2 %}
                  {% if value != 0  %}
                  {{ member }}<b>
                    {% else %}
                  {{ member }}
                   </b> {% endif %}
                {% endfor %}
              {% else %}
              {{ block.settings.content }}
                {% endif %}

 

 

 

Screenshot 2022-10-23 233850.png

Contact for any custom design? Skype : ahsananc
>Was your question answered? Mark it as an Accepted Solution!
Feel Free to Contact Me at my Email: anc2277@gmail.com


To enhance and customize Shopify search and filter, I use Boost Product Filter & Search
sweetbuddie
Explorer
51 1 19

How silly Shopify dose not offer this naturally thanks alot it has worked

could you help me out with something else so the same with the tabs just i have a collapsible row products Nutritional Values and i need a table in it so it looks like the photo dose not have to loo exactly this this

 

aaaa.JPG

 

and also i have another tab Dietary And Lifestyle as a file list tab i added the photos but nothing is showing up on the website

 

dietry.JPG

Ahsan_ANC
Shopify Partner
1362 246 312

Please share the store URL and also how many products in total you have.

Contact for any custom design? Skype : ahsananc
>Was your question answered? Mark it as an Accepted Solution!
Feel Free to Contact Me at my Email: anc2277@gmail.com


To enhance and customize Shopify search and filter, I use Boost Product Filter & Search
sweetbuddie
Explorer
51 1 19

sweetbuddies.co.uk password Scarr123 i will be having over 100 products

Ahsan_ANC
Shopify Partner
1362 246 312

Hi @sweetbuddie  this will require multiple code changes in your store

Contact for any custom design? Skype : ahsananc
>Was your question answered? Mark it as an Accepted Solution!
Feel Free to Contact Me at my Email: anc2277@gmail.com


To enhance and customize Shopify search and filter, I use Boost Product Filter & Search
sweetbuddie
Explorer
51 1 19

i'm up for it 😎

Ahsan_ANC
Shopify Partner
1362 246 312

are you easy with making code changes by yourself?

Contact for any custom design? Skype : ahsananc
>Was your question answered? Mark it as an Accepted Solution!
Feel Free to Contact Me at my Email: anc2277@gmail.com


To enhance and customize Shopify search and filter, I use Boost Product Filter & Search
sweetbuddie
Explorer
51 1 19

yea i have done abit

Ahsan_ANC
Shopify Partner
1362 246 312

please copy the code of main-product.liquid file and paste it into the following google doc file. 

 

https://docs.google.com/document/d/1ooUpb_3vGSyc28EB4FDGPZYU5X9J053_IAgKaSMWnKA/edit?usp=sharing

Contact for any custom design? Skype : ahsananc
>Was your question answered? Mark it as an Accepted Solution!
Feel Free to Contact Me at my Email: anc2277@gmail.com


To enhance and customize Shopify search and filter, I use Boost Product Filter & Search
sweetbuddie
Explorer
51 1 19

ok think i did it

RenV
Tourist
10 0 3

Hi @Ahsan_ANC, thank you so much, it works! But the code is limited to one metafield, do you know how I can adapt the code, so that it will be valid for all existing metafields?

 

Thank you!

Darkons
Visitor
1 0 0

Hello but, it didn't work for me. Here is the metafield's content:

Darkons_0-1701069563741.png

Here is the output:

Darkons_1-1701069605327.png

Am I doing something wrong?