diff --git a/packages/edit-site/src/components/post-edit/index.js b/packages/edit-site/src/components/post-edit/index.js index ecaaa688b0cdf0..3e75ef71d1ac9b 100644 --- a/packages/edit-site/src/components/post-edit/index.js +++ b/packages/edit-site/src/components/post-edit/index.js @@ -49,8 +49,7 @@ function PostEditForm( { postType, postId } ) { ); const [ multiEdits, setMultiEdits ] = useState( {} ); const { editEntityRecord } = useDispatch( coreDataStore ); - // TODO: This needs to be dynamic and will be handled in a follow up with the `format` field for posts. - const { fields: _fields } = usePostFields( { postType: 'page' } ); + const { fields: _fields } = usePostFields( { postType } ); const fields = useMemo( () => _fields?.map( ( field ) => { diff --git a/packages/editor/src/dataviews/store/private-actions.ts b/packages/editor/src/dataviews/store/private-actions.ts index 22986c38a954c2..9e8d184e34d3a4 100644 --- a/packages/editor/src/dataviews/store/private-actions.ts +++ b/packages/editor/src/dataviews/store/private-actions.ts @@ -164,7 +164,7 @@ export const registerPostTypeSchema = currentTheme?.[ 'theme-supports' ]?.[ 'post-thumbnails' ] && featuredImageField, titleField, - authorField, + postTypeConfig.supports?.author && authorField, statusField, dateField, slugField, diff --git a/packages/editor/src/dataviews/types.ts b/packages/editor/src/dataviews/types.ts index 3159be142bc137..ffe996ed61f33a 100644 --- a/packages/editor/src/dataviews/types.ts +++ b/packages/editor/src/dataviews/types.ts @@ -80,6 +80,7 @@ export interface PostType { revisions?: boolean; thumbnail?: boolean; comments?: boolean; + author?: boolean; }; }