WP Exclude category in the index page

Discussion in 'Content Management' started by eXceed69, Jul 11, 2009.

  1. #1
    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.
     
    eXceed69, Jul 11, 2009 IP
  2. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #2
    then do not use exclude tag, use include tag so only that category will appear which no. u will set.
     
    Jalpari, Jul 12, 2009 IP