How can I hide the page title in a product pop-up?

Hi Guys,

I have set up a pop-up from the product page when the size chart button is clicked. The pop-up displays the page title, which I would like to hide and make the image center. I would appreciate your help. To view the pop-up, please click on the size chart button.

URL: https://basicbastard.co/products/basic-sweater-green

Hi,

To hide the title you can go to Online store > Themes > Edit code

Search for and open base.css then go to the bottom of that file and add below class:

.d-none {
  display: none!important;
}

Then go to file: main-product.liquid and search for below

# {{ block.settings.page.title }}

Replace that with below

# {{ block.settings.page.title }}

Save.

A quick fix to then center the image would be to go to section-main-product.css and go to the bottom of that file and add below class:

.product-popup-modal__content-info {
  padding-left: 4.4rem;
}

I would recommend you though to reduce the white space in the image on mobile since it’s not that responsive. I assume most of your traffic will be mobile.

Hope it helps :slightly_smiling_face:

2 Likes

Thank you. Cantering pop up worked but hiding title didn’t work. I deleted the code for the title so no need.

1 Like

No worries. That’s an option as well :slightly_smiling_face:

1 Like