non-premiumpress custom post type taxonomies problem

I am using a plugin which has its own custom post type. Unfortunately, the Categories and Tags of this custom post type are not working. The error: [Unknown column 'wp_eo_events.EndDate' in 'where clause'] SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (8042) ) AND wp_posts.post_type = 'listing_type' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'confirmed' ) AND (wp_eo_events.EndDate > '2019-11-23' OR (wp_eo_events.EndDate = '2019-11-23' AND wp_eo_events.FinishTime > '00:19:42')) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 12 It looks like, a PP function/filter named _pre_get_posts is hooking to all post_types changing the WP Queries. I hope this issue can be resolved in the next update. The related ticket is : DRM-109-62861

Created: November 25, 2019 at 9:22 am
  • In: Bugs & Issues
  • Started by: AdnanAdnan
  • 3 members left 4 comments
  • Last reply from: AdnanAdnan

  • Mark Fail
    Mark Fail
    December 3, 2019 at 1:23 am

    file: new_
    function _pre_get_posts()
    line: 115

    try editing the function there or simply adding;

    return $query;

  • Adnan
    December 3, 2019 at 4:26 pm

    Hi Mark,

    in DT9 the function _pre_get_posts starts at line: 155

    so line: 115 can not be in my case. Which line should we add “return $query;” ?

  • JamesD
    December 4, 2019 at 3:16 am

    Yes, go with what you’re file is (starting line #155).

    If for some reason it’s incorrect then I’m guessing Mark must be referring to a newer file that hasn’t been released yet, otherwise that’s the location to place it.

  • Adnan
    December 4, 2019 at 9:24 pm


    the function is huge, more than 1600 lines. I would like to know which line(s) to change in this function so that custom post type taxonomies are not affected.

Viewing 5 posts - 1 through 5 (of 5 total)