meta_query custom post type not displaying result
-
I have a custom post type ‘news’ installed with a custom meta box ‘author-post-class’ which stores an id from a custom post type of ‘people’. (i could use authors but its a long story!)
I am using the query below for when you are on a user profile for it to display news items the person is an author of.
$args = array( 'post_type' => 'news', 'meta_query' => array( array( 'key' => 'author-post-class', 'value' => '$post->ID', 'compare' => '=' ) ) ); $new_query = new WP_Query( $args );
However, i can see the database has store the key / value correctly and the news item id. However, i cannot get it to produce a result.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘meta_query custom post type not displaying result’ is closed to new replies.