• Hi,

    Date are empty when widget is displayed on SearchWP results page.

    With the help of SearchWP developer, I added this to do it works:

    class hs2830_eo_compat {
      private $ran = false;
      function __construct() {
        add_action( 'searchwp_after_query_index', array( $this, 'eo_compat' ) );
        add_action( 'pre_get_posts', array( $this, 'enforce' ) );
      }
      function eo_compat() {
        $this->ran = true;
      }
      function enforce() {
        SWP()->isMainQuery = false;
      }
    }
    new hs2830_eo_compat();

    Do you know why I need this ?
    Thanks.

  • The topic ‘Date not shown on SearchWP results pages’ is closed to new replies.