[CSS] Hide button
-
Hello,
I use the Custom CSS to hide a specific button.
However, this hides the button across the whole site.I’m looking for a way to hide the button only in specific pages.
I have tried to add a new class from WordPress in the other pages where I don’t want to hide the button, but this does not work.Any tip to do this efficiently?
-
-
Thanks Aisajib. Yes sure!
The website is http://www.jamaleo.com
Here is what I’m trying to do:
In the courses pages, for example
https://www.jamaleo.com/course/fr-preparation-de-votre-manuscrit/, I want to always show the button “Take Course”But in the lesson pages, for example, https://www.jamaleo.com/lesson/fr-preparation-manuscrit-1-contexte/ I want to hide the same button. Right now I have a script which hides the button when the youtube video start playing and shows the button when the video ends.
Ideally, I want to hide it on page loading with CSS not when the video starts
-
Hello there,
You can add a page class, specific to that page, before the CSS, which can apply it only that page.
For example, for https://www.jamaleo.com/course/fr-preparation-de-votre-manuscrit/
The CSS would be:
.postid-1817 .example-class { display: relative; }
The post/page/template ID can be found via Right click > Inspector tools > at the top of the style sheet:
-
- The topic ‘[CSS] Hide button’ is closed to new replies.