Tag Info

New answers tagged


WordPress has a core function human_time_diff that does what you want, using it with the filter you provide you have someting like so: add_filter('latest_tweets_render_date', function( $created_at ){ $date = DateTime::createFromFormat('D M d H:i:s O Y', $created_at ); return sprintf( '%s ' . __( 'ago' ), human_time_diff( $date->format('U') ) ); ...


The query will by default GROUP BY the post ID, meaning that a post will only appear once in the list. You can remove that GROUP BY pretty easily with a filter: add_filter('posts_groupby','__return_empty_string'); $events = new WP_Query($args); remove_filter('posts_groupby','__return_empty_string'); That might get you what you want. It is a bit hard to ...

Top 50 recent answers are included