Get current tag list in Gutenberg save function
Attempt #1 returns objects If I understand it correctly, that’s because getEntityRecord(), upon successful request to the REST API endpoint (e.g. /wp/v2/categories/<id>), returns the term object/data which contains term properties such as name and ID. So, // Instead of: el(‘li’, null, wp.data.select(‘core’).getEntityRecord(‘taxonomy’, ‘custom_taxonomy’, tag)) // you’d use: (note the “.name”) el(‘li’, null, wp.data.select(‘core’).getEntityRecord(‘taxonomy’, ‘custom_taxonomy’, tag).name) … Read more