Is the 404 page the same as “well this is embarrasing” page?

This all depends on your theme. Most themes includes a 404.php template to display a “well this is embarrassing” page or an index of previous posts. For example: My consulting site shows an index: http://jumping-duck.com/does-not-exist One of my client sites shows a basic “404 not found” error: http://votebode.com/does-not-exist They’re both running the latest version of … Read more

Sub Domain’s Pages return 404

You can always delete the .htaccess for each root directory, then visit each domain.com/wp-login.php then visit: Dashboard -> Settings -> Permalinks & save changes. (Automatically generates a fresh .htaccess) OR login to phpmyadmin for each domain, check out the database… options table… verify the “siteurl”, and “home” columns. make sure they match the respective domains. … Read more

page not found for single-type.php file

Follow this tutorial for creating the custom post type. Here is the working code as per your requirement: function create_post_type_event() { //Create custom post type for event $labels = array( ‘name’ => _x(‘Event’, ‘post type general name’), ‘singular_name’ => _x(‘Event’, ‘post type singular name’), ‘add_new’ => _x(‘Add New’, ‘event’), ‘add_new_item’ => __(‘Add New Event’), ‘edit_item’ … Read more

Is the 404 page automatically displayed if a loop returns nothing?

If you want to force the 404.php template to load if there are no found posts, use the template_include filter: function wpa84794_template_check( $template ) { global $wp_query; if ( 0 == $wp_query->found_posts ){ $template = locate_template( array( ‘404.php’, $template ), false ); } return $template; } add_filter( ‘template_include’, ‘wpa84794_template_check’ );

How to use if($wp_query->query_vars[‘name’] == ‘pagethatdontexist’) without getting a 404? How to suppress 404

You can use an earlier action, request, to do whatever you need. It allows you to modify query variables, or even cancel the entire request without issuing a 404 error: function wpse112929_cancel_request_parsing( $query_vars ) { if ( in_array( ‘pagethatdontexist’, $query_vars ) ) { return array(); } return $query_vars; } add_action( ‘request’, ‘wpse112929_cancel_request_parsing’ ); I used … Read more

404 on page 2 multisite

Every front end page request on a WordPress site produces a main query. The template that WordPress decides to load is based on the results of that main query (you can see the order that WordPress does these things by looking at the Action Reference page). Despite the fact that you never output the results … Read more