Get custom taxonomy terms in PHP serialized array (for WpDatatables)

I am creating a data table from a PHP array using the WpDatatables plugin. I followed the instructions (here) and have had no issue getting standard content to display (custom fields etc.) but I cannot figure out how to get taxonomy terms to display correctly. I have tried in various ways but keep getting a ‘cell format’ error.

E.g. I have tried

‘Date’ => get_field (‘date’),
‘Terms’ => get_the_terms (get_the_ID(), ‘taxonomy’)​

…but with no luck.

I would be very grateful for assistance.

Alex

Read more here:: Get custom taxonomy terms in PHP serialized array (for WpDatatables)

Leave a Reply

Your email address will not be published. Required fields are marked *