Home Forums Technical Support Hide Category from Shop page

This topic contains 12 replies, has 2 voices, and was last updated by  Louis Alviss 1 month ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #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
    https://www.tychesoftwares.com/hide-woocommerce-categories-shop/

    Attachments:
    You must be logged in to view attached files.
    #18853

    Hi,

    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

    #18861

    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

    #18867

    Hi,

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

    https://www.dropbox.com/s/54l5ddb5we0arcf/wr-nitro-child.zip?dl=0

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

    https://www.hostinger.com/tutorials/how-to-create-wordpress-child-theme

    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:

    https://docs.woocommerce.com/document/find-product-category-ids/

    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.

    #18948

    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.

    #18949

    code i already added to functions.php

    #18952

    Hi,

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

    Thank you

    #19002

    yes in Twenty Nineteen wheme it’s work fine

    #19009

    Hi,

    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

    #19016

    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

    #19020

    Hi,

    “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

    #19188

    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

    #19193

    Hi,

    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.