Jump to content

Display categories in category.php but not in menu


enkelhandel

Recommended Posts

I am in need to show certain categories in category.php but not in the menu and other dynamic category lists that occur on the site.

 

The function is needed in order to create certain categories that I want to connect e.g. adWords ads to but not want the regular user to be bothered with.

 

I tried to set those categories as inactive and then just change the if statement in category.php to not check if a category is active or not but then it displays 0 products no matter how many products exist in the category. I guess there is some check in the function that creates the product array if the category the product is in is active or not. Not ideally i.m.o.

 

Does anyone know how to achieve this.

Link to comment
Share on other sites

Hello

 

There is a solution, copy blockcategory rename it and then adapt it.

 

The best thing to do would be in back office to store the list of id_category that you want to hide (If I understand well) and then using this list to hide during display.

 

Good dev

Link to comment
Share on other sites

Hello

 

There is a solution, copy blockcategory rename it and then adapt it.

 

The best thing to do would be in back office to store the list of id_category that you want to hide (If I understand well) and then using this list to hide during display.

 

Good dev

 

Thanks for the answer. That would work. I feel though that it would be handy to use the category option visible and only make a small adjustment to category.php to properly show those categories instead of needing to make a separate static list for a modified blockcategories module.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...