Merge meta_value’s into a single row and then loop

It would appear simply un-serialising works: $results = $wpdb->get_results( $sql_str ); foreach($results as &$result) { $result-> my_custom_meta_values = unserialize($result-> my_custom_meta_values); } If anyone can suggest a more efficient way to do this, I’d be interested.

Get_term with meta_query

This is because you’re using a function to get the terms, but writing the meta_query for the posts — the meta_query will actually target terms instead. A couple of ways to solve this are: A custom SQL query Get all the posts from today, then loop through them and count up the use of each term … Read more