103 reputation
5
bio website createopen.com
location Poole, United Kingdom
age 29
visits member for 3 years
seen Nov 21 '13 at 15:53

Jul
11
awarded  Popular Question
Nov
26
comment How do I programmatically generate a 404?
I've needed to do this on at least 2 different occasions. Most recently was making legacy author pages give a 404. It's also something that I'm sure I'll need again in the future.
Nov
26
comment How do I programmatically generate a 404?
Yup. That seemed to work fine. Thanks.
Nov
23
awarded  Scholar
Nov
23
accepted How do I programmatically generate a 404?
Nov
23
comment How do I programmatically generate a 404?
I need to make sure that things like is_single() and is_archive() return false, so any hooks that check them are correct and don't add extra stuff to the 404 page (like the "Next" and "Previous" links). This depends on plugins and themes though.
Nov
23
revised How do I programmatically generate a 404?
Add max_num_pages
Nov
23
comment How do I programmatically generate a 404?
This works but $wp_query->set_404() also runs $wp_query->init_query_flags(), which sets all the other is_* flags to false.
Nov
23
answered How do I programmatically generate a 404?
Nov
23
awarded  Editor
Nov
23
revised How do I programmatically generate a 404?
Clarification
Nov
23
comment How do I programmatically generate a 404?
I want to create a 404. I'll edit the question a bit...
Nov
23
comment Remove author archive
This is great, but is_404() still returns false. Any way to trick WP into thinking it's really a 404?
Nov
23
comment How do I programmatically generate a 404?
Perhaps I could modify the query to search for a non-existent page.
Nov
23
asked How do I programmatically generate a 404?
Oct
14
awarded  Supporter
Aug
31
awarded  Autobiographer