daringdiva
Advanced Member
138 Posts |
Posted - 09/06/2021 : 08:10:07
I am trying to hide a category using the Custom CSS feature, but am unable to get it to work. Can someone help?
|
Vince
Administrator
42874 Posts |
Posted - 09/06/2021 : 08:30:00
|
daringdiva
Advanced Member
138 Posts |
Posted - 09/06/2021 : 08:55:18
I am setting up Articles, using the Article feature and I don't want to have the different article links to show in my category. I was trying to follow the instructions posted here by Steve https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=113372&SearchTerms=hide,category , but this is for asp and did not work for me.
You can now set a custom css class in the categories section.
Then in your css file you can add that class and use display:none to hide it.
So for example,
If css custom class set on the categories page is hidecat then add this to your css file:
.hidecat{display:none;}
Steve
|
Steved
Ecommerce Template Guru
United Kingdom
1022 Posts Pre-sales questions only (More Details...)
|
Posted - 09/06/2021 : 12:26:17
Hi - Here’s the crucial bit from the post you mention:
[quote]Go to the categories page in admin and from the left hand drop down menu select custom css class.
Find the category you want to hide and choose a name (such as hidecat) to add to the custom css box.
Update/save
Then in you style.css file add the css as per my example (where I had randomly chosen hidecat)
If you do use the word hidecat you would use this css:
.hidecat{display:none;}[/quote]
This will hide the category but the links to your article pages will still work.
Steve
Edited by - Steved on 09/06/2021 12:27:15
|
daringdiva
Advanced Member
138 Posts |
Posted - 09/06/2021 : 14:20:47
I did exactly this, but it did not work for me. I must be missing something...does this work for php also?
|
1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 09/06/2021 : 17:07:14
I have to say that out of curiosity I have tried this on three ECT php based websites using a mix of three different ECT templates, one is using Articles, one that is a test site which is 'out of the box', so to speak, & one that's been a live site for many years with zero mods & I am still able to see the category where the custom.css class has been added in the admin. All are currently on 7.3.4.
Is there possibly an issue hiding categories with the php version?
Steve Bolton Lancashire
Edited by - 1818charlie on 09/06/2021 17:23:03
|
Marshall
Ecommerce Template Guru
USA
1916 Posts |
Posted - 09/06/2021 : 17:26:43
Are you clearing you cache? You may not be getting the updated style sheet.
Marshall CENLYT Productions - ms designs Affordable Web Design Custom Ecommerce Designs Responsive Websites Cenlyt.com
|
1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 09/06/2021 : 17:33:41
Hi Marshall
Yes. Checking for the CSS changes using the browser view source and then viewing the CSS file entries show the changes are definitely there
Steve Bolton Lancashire
Edited by - 1818charlie on 09/06/2021 17:36:56
|
Steved
Ecommerce Template Guru
United Kingdom
1022 Posts Pre-sales questions only (More Details...)
|
Posted - 09/07/2021 : 01:52:05
That's odd because it's working fine for me.
I'm using php ECT version 7.4.2
My choice of custom css class in categories admin is hidecategory
In style.css I have .hidecategory {display: none;}
I tested it and it functions correctly.
Steve
|
Phil
ECT Moderator
United Kingdom
7715 Posts |
Posted - 09/07/2021 : 02:05:57
Edited by - Phil on 09/07/2021 02:08:07
|
1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 09/07/2021 : 03:44:31
Good morning Phil That has worked using the CSS .hidecat.category {display:none;}  Steve Bolton Lancashire
|
daringdiva
Advanced Member
138 Posts |
Posted - 09/07/2021 : 06:13:27
I still cannot get it to work properly for me. I added it to the "style.css" file in the folder css/style.css . On the category page, I no longer see the category I want to hide, but it still shows in the left navigation menu.
|
Phil
ECT Moderator
United Kingdom
7715 Posts |
Posted - 09/07/2021 : 06:17:41
Edited by - Phil on 09/07/2021 06:26:02
|
Marshall
Ecommerce Template Guru
USA
1916 Posts |
Posted - 09/07/2021 : 09:13:06
Is there a reason you are not simply disabling the category?
Marshall CENLYT Productions - ms designs Affordable Web Design Custom Ecommerce Designs Responsive Websites Cenlyt.com
|
daringdiva
Advanced Member
138 Posts |
Posted - 09/07/2021 : 09:37:10
If I disable the category, then the article will not show.
|
Phil
ECT Moderator
United Kingdom
7715 Posts |
Posted - 09/07/2021 : 10:36:52
Edited by - Phil on 09/07/2021 10:37:53
|
daringdiva
Advanced Member
138 Posts |
Posted - 09/07/2021 : 10:42:42
I clicked on your name and sent an email, but it is the website in my profile and the category that I am trying to hide is "African American Christmas Cards"....
|
Phil
ECT Moderator
United Kingdom
7715 Posts |
Posted - 09/07/2021 : 10:51:54
|
daringdiva
Advanced Member
138 Posts |
Posted - 09/07/2021 : 11:32:58
Ok, I saw that on another post, and tried it and it worked...didn't know if I missed something with the dynamic menu. Thanks so much!
|
|
|