Home Forums Technical Support Hide Category from Shop page

This topic contains 12 replies, has 2 voices, and was last updated by  Nitro Support 4 months, 3 weeks ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
  • #18840

    Hello please can you tell me where need paste this code for hide category Please see image ‘3’

    The side where i get code is here

    You must be logged in to view attached files.


    In that guide it said:

    I have added this code snippet in my currently active theme’s functions.php file

    So you can do the same in the Nitro theme (Child theme)

    Thank you


    Yes but i dont understand what is mean Nitro Child theme ?
    What is name of file
    and whit line i need add
    $new_terms = array();
    $hide_category = array( 126 ); // Ids of the category you don’t want to display on the shop page
    only this 2 line ? or need something add before
    i just need hide from display on the shop page



    Here is the Nitro Child theme package to install in the Appearance > Theme :


    and you can create a functions.php file in this Child theme folder, you can take a look at this guide to know more:


    And if you don’t have any custom code in this file previously, you can add the code to the first line of the file, and the ID of the Category can get in the Woocommerce > Category, here is the guide from Woocommerce:


    Regarding that custom code functions or further, I have no idea on it, you will need to contact that code provider for more details, thank you.


    Yes i already have added please see this image https://monosnap.com/file/ZSZM3dIb4Hj4GAhPfRYBQd1JcfDBOi
    but food category wtill have in shop page you can see here https://www.jumunona.com/shop/
    set product from top price or new’s price and it will be first.
    Product name “Food category”

    I have text to support and they tell me this

    Hi Nazir,

    Thank you for sharing the screenshot and link to your website.

    The code is correct but I am not sure why it is not excluding ‘Food category’ from the shop page. It would be great if you can check the same code in Storefront theme. If things are working fine on the Storefront theme then please contact your theme author about this issue. They will help you better in this matter.


    code i already added to functions.php



    So does it work in another theme but not in Nitro theme ?

    Thank you


    yes in Twenty Nineteen wheme it’s work fine



    Then please kindly point out the difference between Nitro and Twenty so I can try to achieve the same result with Nitro for you.

    Thank you


    Twenty Nineteen is standart theme in woocommerce i dont know how to do  what  is the difference. You ask me are that work with another theme i have paste code to another theme and it’s work



    “i have paste code to another theme and it’s work”

    > Then just point me out what works in another theme but not Nitro theme for you, I will compare and suggest a fix in Nitro theme.

    Thank you


    i need dont show the food category in shop page (product name is “Food category”) this product is the food category’s product. So that code is for hide category from shop page



    Let me put in this way, on which specific page do you have the problem > Please share this page url.

    Then activate the Twenty theme and point out what happened on this theme but doesn’t happen on Nitro.

    This way will help me understand correctly.

    Thank you

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.