Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16442

    Hi guys,

    I want to exclude a category from being displayed on the front page. Because I’ll post that category in other page.

    Do you have idea on how to exclude a category?

    Thanks!

    #91519

    Open up index.php and replace following line:

    $negative_cats = preg_replace("!(d)+!","-${0}$0", $k_option['mainpage']['main_cat_final']);

    with:

    $negative_cats = preg_replace("!(d)+!","-${0}$0", $k_option['mainpage']['main_cat_final']);
    $negative_cats .= ',16,26,45';

    and instead of 16,26,45 insert the category id(s) you want to exclude. Seperate the ids by using a comma (,).

    #91520

    Dude,

    Thanks for your help. I put the code you mentioned and insert just the category id 13, however now the main page is not display any category (I´ve got a few categories that previusly where shown up).

    http://www.chacrasdecoria.travel

    Thanks!

    #91521

    Dude I just realize that the category IDs to put in the code are those I want to show up. So the code exclude those that are not listed there.

    Maybe it work with the negative simbol before, so you don´t need to clarify the positivies ones.

    Thanks!

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

The topic ‘Exclude category from front page’ is closed to new replies.