Plugin Directory

Changeset 1477780


Ignore:
Timestamp:
08/18/2016 12:01:30 PM (10 years ago)
Author:
smartware.cc
Message:

current dev version for testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 404page/trunk/404page.php

    r1472214 r1477780  
    140140    $pageid = $this->settings['404page_page_id'];
    141141    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 ) ) {
    143143        // we need to get the 404 page
    144144       
     
    206206  // this function overrides the page template in compatibilty mode
    207207  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;
    209213  }
    210214 
Note: See TracChangeset for help on using the changeset viewer.