Custom Fields
Re-Envisioned
Support General Error caused by Metabox: tax_query

This topic contains 2 replies, has 2 voices, and was last updated by  Bernhard Niemann 2 weeks, 3 days ago.

  • Creator
    Topic
  • #16653
    Resolved
    Bernhard Niemann
    Participant

    Hello,

    Metabox is causing an error on my Site. I want to query posts of a custom post type with a special taxonomy. I am not able to do this, when Meta Box is activated.

    WordPress-Datenbank-Fehler: [Unknown column ‘wp_term_relationships.term_taxonomy_id’ in ‘where clause’]
    SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (17) ) AND wp_posts.post_type = ‘kandidat’ AND ((wp_posts.post_status = ‘publish’)) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10

    I use to do this before and it always worked with Metabox, but its not working in this case at the moment.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #16659

    Anh Tran
    Keymaster

    Hi Bernhard,

    The table wp_term_relationships and the column term_taxonomy_id are default in WP. See this page for details. Please check your DB via a tool like phpMyAdmin to see if your database is broken.

    If it’s not, please post the code you use to query the posts here. Maybe the code from that query.

    #16729

    Bernhard Niemann
    Participant

    Thanks for the fast reply. You can close this topic. I found what was causing the error – it was not meta box!

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.