Tag Info

Hot answers tagged

2

Things are working the way they are supposed to, and possibly the only way they can work. Let me explain. Without an Apache module called mod_rewrite (or the equivalent Nginx or IIS component) requests to PHP pages have to go to an actual filesystem file. That is what you see with requests like 192.168.1.8/wordpress/?p=123. The file being accessed is the ...


1

I have run into the same issue that using $wp_query->set_404(); would properly adjust the global object but not return the 404 template. So in the plugin I was writing I used the tried and tested method: add_filter( 'template_include', 'wp_139917_force_404' ); function wp_139917_force_404(){ global $wp_query; $wp_query->set_404(); ...



Only top voted, non community-wiki answers of a minimum length are eligible