The FAQ’s advice for using my-hacks.php to hide categories (http://faq.wordpress.net/view.php?p=55) seems to be broken in 1.5. Any suggestions for changes?
The hack currently reads:
You can exclude a categoryâ€™s posts from appearing on index.php by adding the following code at the top of the my-hacks.php (my-hacks.php should exist, and my-hacks.php support should be enabled in Options -> Miscellaneous )after the â€œ<?php â€? line :
if ((empty($_GET['cat']))&&(!preg_match('/wp-admin/', $_SERVER['REQUEST_URI']))) $cat = '-1'; //Replace 1 with your category
- The topic ‘Hiding categories’ is closed to new replies.