I have a custom post type with a bunch of custom meta values. I want to display a list showing 10 posts ordered by most recently modified.
My query args looks like this
$args = array( 'post_type' => array( 'post_type_harmonic' ), 'posts_per_page' => '10', 'orderby' => 'modified', 'order' => 'DESC', );
The problem is that the order of the posts seems to be the publish date, not the modified date.
I need to either:
A) Modify the query so that 'modified' also includes updated/changes custom meta values, OR
B) perhaps the problem is that when I update a meta value
update_post_meta( $data, 'hd_meta_key', $today.' : The Post Was Accessed' );
Wordpress does not count this as a post 'modification'. Perhaps there is a way to update this as well? Maybe updating
the_content is a way to trick WordPress into updating the modify date as well?
Thanks in advance!