Easy-Fix Hide text with CSS

Hi Craig,

Today is a productive day in Magento over here. Sorry for multiple topics :slight_smile:
I have two questions:

  1. Please check this website out

In the bottom, they have added a box with a lot of text starting with a header saying “5 Nyckeltrender”. This text is for Seo purposes.
I want to add the same box of text in my page, but in my current theme Novetty from Themeforest I dont see any option to do this. And when browsing the web it seems that there are no option to customize this pat of the category page as well. So how can this be done, any advice?
If it is only done by manual coding, where do I do this and do you have any example?

  1. On my site I have a text like this that I do now want to have. That appears when the product only exist in one style (no optins for other colors or sizes)
    I do not want to go deep and remove this in the theme code, I just though of doing a quick fix to hide this div class by using this css code.
.product pricing {
   display: none;

Can this work? If yes, where do I put the code?


My answer will be kinda brief, cause I’ve gotta crack on with my work too. But here goes…

There are a few ways that you can do this. The simplest (without coding) is going to be with the use of Static Blocks and Widgets.

So, you’d create a Static Block with your HTML/Content. Once you’re happy, you would create a Widget. Note that this may involve some trial and error your end to find the right configuration. But you can use the Widget to embed your Static Block on Specific Pages or Single Pages.

If memory serves, you’ll want to turn off the following Caches in order to see your changes on the Frontend whenever you save any changes:

  • Layouts
  • Blocks HTML output
  • Page Cache

CSS display:none is kind of a “sticky plaster” method. In theory this should work, but you should revisit this once your skills advance to the next level. Just be sure that this doesn’t also affect other outputs without you realising.

Thank you Craig, I totally understand.
Now this Text looks like this

And its located at the product page that I cannot edit thorugh the “Pages” in admin (wonder why??). Its like it auto generated. So how do I grab that Product Page - Pages that consistently changing depending on which product the site is showing?

I appreciate you reply a lot, but I understand the time management with your own work :slight_smile:

I’m sorry, I’m confused.

Are you trying to completely hide the “…available to buy in increments…” message? Because you can do that by changing the following settings:

Stores > Configuration > Catalog > Inventory > Enable Qty Increments = No
(Which is actually the default value)

This can also override this per Product too. You go into a Product, then under “Quantity” press the “Advanced Inventory” link where you’ll find “Enable Qty Increments”.

1 Like

Look what I learned now, Than you!!

1 Like

It’s the little things you come across that count. Learning by doing or learning by fixing. You won’t make that mistake in your next Magento project :slight_smile:

1 Like

Hi again Craig,

A question regarding you answer on my question no 1 about adding the static blocks and widgets to the category page. I understand your instructions, but I cannot find the “Category” page in the Pages section in admin. Is it because this page is dynamically change depending on which category is going to be displayed? So where do I “choose” a specific category page to add this Static Block + Widget to insert or embed to that specific page?


The option to select a Category in a Widget is here:

You shouldn’t be doing anything in Pages

1 Like

Amazing, thanks!!:pray: