WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #47614, comment 1


Ignore:
Timestamp:
06/27/2019 06:06:34 AM (5 months ago)
Author:
knutsp
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #47614, comment 1

    initial v1  
    33It's hard to say why you can't get your meta query to work with so little information, if that is the situation.
    44
    5 To say that meta queries only work for post type "post" is not correct. Sites and developers depend on that all he time.
     5To say that meta queries only work for post type "post" is not correct. Sites and developers depend on that all the time.
    66
    77In the line you are quoting, parameter 1 for the `get_sql`method is the **object** type, not the post type. Object types are "post", "user", "term", "comment" and such that have a meta table in the database. `$wpdb->posts` is the main table for all post types.