1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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