Skip to content

Other admin parameters

John Blackbourn edited this page Oct 5, 2021 · 12 revisions

Along with admin columns and admin filters, several other parameters are available that provide functionality in the admin area.

Featured Image Name

The "Featured Image" text used in various places in the admin area can be replaced with a more appropriate name for the featured image for your post type by using the featured_image parameter. For example:

register_extended_post_type( 'company', array(
	'featured_image' => 'Corporate Logo'
) );

"Enter Title Here" Value

The "Enter Title Here" text used as the placeholder text in the title field on the editing screen for your post type can be replaced with more appropriate text by using the enter_title_here parameter. For example:

register_extended_post_type( 'company', array(
	'enter_title_here' => 'Company Name'
) );

Disable Quick Edit

Quick Edit functionality is enabled for all post types by default. Quick Edit can be disabled if you wish by passing boolean false to the quick_edit parameter.

register_extended_post_type( 'article', array(
	'quick_edit' => false
) );

Dashboard "At a Glance" Item

An entry is added to the "At a Glance" dashboard widget for your post type by default. It can be disabled if you wish by passing boolean false to the dashboard_glance parameter.

register_extended_post_type( 'article', array(
	'dashboard_glance' => false
) );

Dashboard "Recently Published" Feed

It's possible to include your post type in the "Recently Published" section of the "Activity" widget on the dashboard. This isn't enabled by default, and can be enabled by passing boolean true to the dashboard_activity parameter.

register_extended_post_type( 'article', array(
	'dashboard_activity' => true
) );

Force Enable or Disable the Block Editor

It's possible to force enable or disable the block editor for a post type with the block_editor argument. This option overrides the Classic Editor plugin if it's in use. The primary use of this argument is to allow a post type to be exposed via the REST API with show_in_rest but still use the classic editor.

This must be used in combination with the show_in_rest argument.

register_extended_post_type( 'article', array(
	'show_in_rest' => true,
	'block_editor' => false,
) );