All post types with getEntityRecords

Question

As the title states https://developer.wordpress.org/block-editor/data/data-core/#getEntityRecords doesn’t allow an array of post types or any sort of delimited types. WP_Query normally accepts ‘any’ but that doesn’t work any suggestion for a JSX novice please. Ive checked my local endpoint for any clues and this just shows me all my existing post types i can filter by but no indication how to filter by multiple post types. I currently have this.

const { getEntityRecords } = select( 'core' );
return {
    suggestions: getEntityRecords( 'posts', '', { per_page: -1, search: ownProps.value } ), 
    onChange: ownProps.onChange,
    value: ownProps.value
}
0
, Johnny 1 year 2020-07-16T16:11:53-05:00 0 Answers 50 views 0

Leave an answer

Browse
Browse