Want to hide cat from index page.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Want to hide cat from index page.

    Hi I want to show every category exept 2-3 category in my blogs first page. like:
    this is my categories:
    Code:
    recent world, movie review, article review, game review, personal experience, life in a metro, other category
    Now I dont want to show 2-3 category in the first page. what to do? So far I only can hide 1 category with this code:
    PHP Code:
    $result mysql_query("SELECT * FROM blog WHERE id!='' and cat!='10' order by id desc LIMIT $from$rpp");
    while (
    $row mysql_fetch_array($result)) {

    but I need more than one to hide from the first/index page. what to do, please help.

    #2
    and cat!=2 and cat!=3

    Comment


      #3
      Originally posted by asifnayem View Post
      Hi I want to show every category exept 2-3 category in my blogs first page. like:
      this is my categories:
      Code:
      recent world, movie review, article review, game review, personal experience, life in a metro, other category
      Now I dont want to show 2-3 category in the first page. what to do? So far I only can hide 1 category with this code:
      PHP Code:
      $result mysql_query("SELECT * FROM blog WHERE id!='' and cat!='10' order by id desc LIMIT $from$rpp");
      while (
      $row mysql_fetch_array($result)) {

      but I need more than one to hide from the first/index page. what to do, please help.
      use preg match to filter from display for example if(preg_match .. etc){ /*show nothing*/} else {show these }

      or simply like if(!preg_match .. etc){ show only the one i want to}
      This is ten percent luck, twenty percent skill
      Fifteen percent concentrated power of will
      Five percent pleasure, fifty percent pain

      And a hundred percent reason to remember the name!

      Comment


        #4
        Originally posted by asifnayem View Post
        Hi I want to show every category exept 2-3 category in my blogs first page. like:
        this is my categories:
        Code:
        recent world, movie review, article review, game review, personal experience, life in a metro, other category
        Now I dont want to show 2-3 category in the first page. what to do? So far I only can hide 1 category with this code:
        PHP Code:
        $result mysql_query("SELECT * FROM blog WHERE id!='' and cat!='10' order by id desc LIMIT $from$rpp");
        while (
        $row mysql_fetch_array($result)) {

        but I need more than one to hide from the first/index page. what to do, please help.



        AND cat NOT IN ( 1,2,3,... )

        Comment

        Working...
        X