I know that this sample code below will keep certain category be excluded in the index. <?php if (in_category('3') && is_home() ) continue; ?> Code (markup): But my problem is, I want to remove all sub category of certain categ. For example, I have main category of fruits and it have apple, orange and melon as sub category. I want to remove apple, orange and melon be remove in the index page only. I know there are no certain plugin for this.So, any help with the coding.