WordPress Speed Up Service | WordPress Website Maintenance Packages Reply To: Excluding category form home page code not working?, by Steve Stern 1. Do you know for sure the category in question has an ID of 8? 2. You’re missing the parens on the functions. See the first example at https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts 3. Be sure to use is_main_query(), too, as shown in that example. Reply To: Excluding category form home page code not working?