chaka chaka can i go home now?

wordpress exclude categories from main page

to exclude certain categories from the main page of your blog (assuming you’re like the other 99% non-freaks who use blog posts not a static page as your main page) like how i’m not cluttering my posts with my baju category aka category 23 and instead forcing voyeuristic casual surfers with ephebephilic tendencies to click on a navigational link in my interesting footer

deep breath

in the earlier layout, i used wordpress’ built-in Query_posts, placing following syntax into the index.php file of my theme. (whitespace makes no difference.)

<?php
   if (is_home()) {
      query_posts("cat=-23");
   }
?>

but for some reason, this method didn’t work with derek powazek’s awesome minimalist DePo skinny theme (which, if you hadn’t noticed, i’m currently loving).

so, i googled this trick. just pop in

<?php query_posts($query_string . “&cat=-23″); ?>

before the line that says:

< ?php if (have_posts()) : ?>

ta-dah! done.additional: for hemingway reloaded template, insert &cat=-23 into existing query like so

<?php query_posts(’showposts=10&cat=-23‘); ?>


tagged , , ,

9 Comments

you lost me at “built-in Query_posts, placing following syntax into the index.php file of my theme. (whitespace makes no difference.)…….”

im too much of a IT bimbo slash buta IT person. BUT now i know who to go to…hehe.

Posted by Hex on 27 August 2008 @ 12am

i knew you got a wordpress blog! i want~

:D

Posted by justine on 27 August 2008 @ 2am

Nice minimalist theme… Cheers.

Posted by Vaibhav on 27 August 2008 @ 4am

thanks. i’m sure derek powazek is grateful for the compliment. ;p

Posted by justine on 27 August 2008 @ 9am

bila nak go for siew yeh?

Posted by Lainie on 27 August 2008 @ 11am

i’m guessing you’re back from sarawak? damnit. should have asked you to buy me a pack of laksa. :(

when we eating and where?

Posted by justine on 27 August 2008 @ 2pm

u want laksa arh??

i help u buy. i going in sept :P

Posted by naeboo on 27 August 2008 @ 5pm

OMG, boo! i soooo want! if can get more packets get only i will be in your debt forever. :O

Posted by justine on 27 August 2008 @ 7pm

gasp! i dun have i dun have! haha.

Posted by Hex on 4 September 2008 @ 9pm

Leave a Comment

a little 80s exchanging peasantries