Changeset 1477780
- Timestamp:
- 08/18/2016 12:01:30 PM (10 years ago)
- File:
-
- 1 edited
-
404page/trunk/404page.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
404page/trunk/404page.php
r1472214 r1477780 140 140 $pageid = $this->settings['404page_page_id']; 141 141 if ( 0 != $pageid ) { 142 if ( empty( $posts ) && is_main_query() && !is_robots() && !is_home() && !is_feed() && !is_search() && ( !defined('DOING_AJAX') || !DOING_AJAX ) ) {142 if ( empty( $posts ) && is_main_query() && !is_robots() && !is_home() && !is_feed() && !is_search() && !is_archive() && ( !defined('DOING_AJAX') || !DOING_AJAX ) ) { 143 143 // we need to get the 404 page 144 144 … … 206 206 // this function overrides the page template in compatibilty mode 207 207 function change_404_template( $template ) { 208 return $this->template; 208 // we have to check if the template file is there because if the theme was changed maybe a wrong template is stored in the database 209 if ( file_exists( $this->template ) || '' != locate_template( $this->template ) ) { 210 return $this->template; 211 } 212 return $template; 209 213 } 210 214
Note: See TracChangeset
for help on using the changeset viewer.