How to break meta values into different items and avoid duplicates?
This is just a basic php array question – not a WP question. function unique_authors ( $authors ) { $newArray = array(); foreach( $authors as $item ) { $itemArray = explode( “, “, $item ); $newArray = array_merge($newArray, $itemArray); } $newArray = array_unique($newArray); return $newArray; } $authors = unique_authors( $authors ); foreach( $authors as $author … Read more