Hiding a Category

  • daniel white
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 5 months ago #118383 by daniel white
Hiding a Category was created by daniel white
Hi,

I was wondering if there was a way to hide a particular category when using the category menu item. I want to be able to show the majority of my categories apart from a select few. I presume there must be a way using category ID, but is this something I have to add in code to any of the php files in the backend, or is there any custom css I can add anywhere.

Thanks

Please Log in or Create an account to join the conversation.

More
5 years 5 months ago #118388 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Hiding a Category
Hi Daniel

Could you please send us the link to the page and tell us what category you want to hide? We will look at it and hopefully, come up with a solution

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • daniel white
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 5 months ago #118396 by daniel white
Replied by daniel white on topic Hiding a Category
Hi Tuan,

The page is:

www.evidencetalks.com/training/courses

The category I would like to hide is the last category with the Kiosk Online Training, but there may be more in the future as different courses become available. Ideally I was wanting a page for one set of courses and a page for a set of other courses. At the minute in your menu category I can set either all or individual but not selected categories. If there is a way I could pick by ID or a way to link a category to a specific field to help it populate in the menu would be great. Is there some custom css I could add?

Thanks,

Dan.

Please Log in or Create an account to join the conversation.

More
5 years 5 months ago #118397 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Hiding a Category
Hi Dan

You can try to go to Events Booking -> Configuration, look at custom css tab, add this custom css code:

#eb-event .eb-category-10
{
display: none;
}

Then the system will hide all events from category with ID = 10. You can do the same for other categories

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • daniel white
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 5 months ago #118398 by daniel white
Replied by daniel white on topic Hiding a Category
Hi Tuan,

I have entered that code to the custom CSS tab as described, but it takes no effect on the main page, am I missing an element of coding that references the page it is on?

Thanks,

Dan.

Please Log in or Create an account to join the conversation.

More
5 years 5 months ago #118399 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Hiding a Category
That's strange to me. You can submit a support ticket sending us super admin account and link to the page, tell us the category you want to hide events and we will try to add custom css to hide it

Tuan

Please Log in or Create an account to join the conversation.

  • daniel white
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 5 months ago #118400 by daniel white
Replied by daniel white on topic Hiding a Category
Hi Tuan,

Sorry I am unable to give you super user access due to the nature of our website.

I did make an adjustment to the code, which partially worked, but instead of hiding one category it hid all, is there something I can change on this to make it work, the code is:

#eb-categories .eb-category-13, #eb-events .eb-event
{
display: none;
}

Thanks,

Dan.

Please Log in or Create an account to join the conversation.

More
5 years 5 months ago #118401 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Hiding a Category
That's wrong css code and that's why it hides all events

If you view the source code, you will see that all events are surrounded by a div with id = eb-events, then for each event, it's located inside one div with css class like eb-category-8 eb-event clearfix

Base on that, you should be able to figure out the css code you want to use (the code I sent you is correct to me, I don't understand why it doesn' work for you)

Without having access to change css code and check the result myself, I am sorry but I don't have a way to assist

Tuan

Please Log in or Create an account to join the conversation.

  • daniel white
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 5 months ago #118404 by daniel white
Replied by daniel white on topic Hiding a Category
Hi Tuan,

I have been playing around with the code and it appears by shortening the code down it then works, the code I have now is:

.eb-category-13
{
display: none !important;
}

The only issue I now have is that I want to be able to display that category on another page, is there a way I can adjust the code to affect one page and not the other. I thought it may be to add a css link in the menu item and then reference it, but I can't seem to get that to work.

Thanks,

Dan.

Please Log in or Create an account to join the conversation.

More
5 years 5 months ago #118405 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Hiding a Category
If you view source of the page, you will see the body has this css class itemid-2872 (2872 is id of the active menu item)

So maybe you can try to change css code to

itemid-2872 .eb-category-13
{
display: none !important;
}

Then it should only affect that page

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc