I need get a post only if publish_date is equal to modified date in this case the post is not modified! So i need post NOT MODIFIED!:
My query is:
$lastupdated_args = array(
'post__not_in' => $to_exclude,
'paged' => $paged,
'orderby' => 'modified',
'ignore_sticky_posts' => '1',
'post_status' => 'publish',
'post_type' => 'post',
'meta_key''date_query' => 'vip_box',[
'meta_compare'[ 'before' => 'NOT'post_modified' EXISTS',]
],
'meta_query' => array( //NEW UPDATE QUERY'date_query' FOR=> DATE[
[ array(
'column' 'key' => $query->modified'post_modified_gmt',
'after' 'value' => $query->publish_date'post_date_gmt',
'compare''inclusive' => '=',
false
]
'type' => 'DATE'],
)
;
function wpse_modified( $where )
);{
But nothing work i have also tried with:
$lastupdated_args = array(
array(
global $wpdb;
// 'key'Run =>only 'modified',once:
remove_filter( current_filter(), __FUNCTION__ );
'value' => 'publish_date',
// Append custom SQL
return $where 'compare'. =>" '=',
AND {$wpdb->posts}.post_modified} != {$wpdb->posts}.post_modified} ";
}
add_filter( 'posts_where', 'wpse_modified' );
'type' => 'DATE'
$lastupdated_loop = new WP_Query( $lastupdated_args );
query_posts( $lastupdated_args );
How to get a dynamic value like date (published and modified) during this query for comparison?