How to remove button to top only on certain pages?

Hi there, is it possible i can remove the button to top only on some of pages?

kind regards

Hello there,

To globally hide the slide button, you can use this CSS code:

    .button-slider {
      display: none;

To hide on specific page, use page ID selector:

    .page-id-2 .button-slider {
      display: none;

Replace the number 2 with page ID number of your page. You can get it while editing it – in the address bar of web browser, you’ll see an URL that reads something like:

For multiple pages, use this code:

    .page-id-2 .button-slider,
    .page-id-3 .button-slider,
    .page-id-4 .button-slider {
      display: none;

To apply extra CSS code to your site, add it to Appearance > Customize > Additional CSS from dashboard.


Hi Kharis,

Thanks a lot for getting back to me.

**This doesn’t seem to be working at all? I am trying to apply this code to product pages and wc. shop / checkout pages, I’m thinking this shouldn’t have an effect, surely the ID is still used? **

Any ideas what i may be getting wrong?

**Also can you help? Should i be putting all my CSS in additional custom CSS in customiser as i am doing? Is this efficient, speed etc? ** I have a plugin minifying CSS, does where the CSS is put effect compression etc?
**Or should i be using a plugin? I see custom CSS plugin talked about a lot, ofter think am i taking the amateur route?? **

**My assumption is the the way i am doing it it uploads direct to the PHP. CSS stylesheet? Is this correct? meaning my risk of loosing when theme updates? (i back up separate docs to avoid this however starting to code PHP so can keep track forever…) **

**If i upload a child them how does this work? Does it mean i activate it permanently, and all changes effect child PHP files, and never getting updated with theme update?

Im bit confused, sorry for essay! appreciate your help Kharis.**

Best Wishes,