Metafield showing on pages where the metafield should be blank

Topic summary

Issue: A Shopify store’s page metafield (used to recommend products and set a page title via a dynamic source) is appearing on unrelated pages like the Corporate Sustainability page. Screenshots were shared to illustrate the unwanted display.

Context: A metafield is a custom data field in Shopify; the user bound a collection list’s title to a metafield named “title” in the theme editor (no custom code). Theme: Empire.

Suggestions offered:

  • Create two templates: one with the recommended products section, one without, and assign the appropriate template to relevant pages/products.
  • Add conditional display logic so the metafield renders only when it has a value (helper requested theme name and code to advise; user confirmed Empire and no code was used).

Current status: No confirmed fix. The likely next step is to implement conditional rendering in the Empire theme (show block only if the metafield is populated) or use separate templates to prevent the section from appearing on non-relevant pages.

Open items: Provide/adjust theme settings or code to conditionally hide empty metafields; decide on template assignment strategy.

Summarized with AI on December 22. AI used: gpt-5.

HI

i have added a metafield to some of my pages, which recommends products for that specific page. however this metafield also shows up on other pages such as corporate sutainability page, and other non relevant pages. see screenshots below:

please advise how i can remove this off the pages where it is not required?

the metafield is the title of the page

Hi , @ihs1

Pls considering create two product detail templates.

One template has the recommended products configured, the other one do not have recommended products configured.

Last step. Choose corresponding template for all your products

Hi @ihs1 ,

To address the issue of displaying the metafield only when it has a value, we need to check the metafield variable for each page. This will help ensure the metafield appears only on the relevant pages.

Could you please provide the following details?

1.The name of the theme you are using for your store.

2.The code you used to display the metafield.

With this information, we might be able to provide a detailed solution to the problem you are facing.

If you need further assistance, feel free to reach out!
I hope this helps! If it does, please like it and mark it as a solution!

Regards,
Sweans

HI

i am using Empire theme

and i did not use any code. i simply connected a collection list, and for the title i connected a dynamic source as the metafield called title