generated from bisco/codex-bootstrap
fix: show structured fields in classic editor
This commit is contained in:
@@ -148,10 +148,13 @@ uses different host paths or image user IDs.
|
||||
|
||||
- **Appearance > Customize**: hero, manifesto, laboratory, teacher, lessons, contacts,
|
||||
social links, and footer.
|
||||
- **Shows**: poster, title, short description, year, place, and order. The line above
|
||||
each title is built from **Anno** and **Luogo** inside **Dettagli spettacolo**. The
|
||||
text below the title is **Descrizione breve**.
|
||||
- **Gallery**: image, category, caption/title, and order.
|
||||
- **Shows**: poster, title, short description, year, place, and order. Shows use the
|
||||
classic WordPress editor so the **Dettagli spettacolo** box is always visible below
|
||||
the title/content area. The line above each title is built from **Anno** and
|
||||
**Luogo**; the text below the title is **Descrizione breve**, stored as the standard
|
||||
WordPress excerpt.
|
||||
- **Gallery**: image, category, caption/title, and order. Gallery items also use the
|
||||
classic editor for a predictable metadata form.
|
||||
- **Settings > General**: site name and tagline.
|
||||
|
||||
Real uploaded images replace the built-in editorial SVG placeholders. The three
|
||||
|
||||
+7
-1
@@ -51,12 +51,18 @@ HTTPS redirects during production startup.
|
||||
## Show card description is hard to find
|
||||
|
||||
Edit **Spettacoli**, open the show, then use **Dettagli spettacolo > Descrizione
|
||||
breve**. That field is rendered below the title in the homepage show card.
|
||||
breve**. That field is rendered below the title in the homepage show card and is stored
|
||||
as the standard WordPress excerpt.
|
||||
|
||||
The small uppercase line above the title is not the description. It is built from
|
||||
**Dettagli spettacolo > Anno** and **Luogo**. Empty fields are hidden on the public
|
||||
card.
|
||||
|
||||
Shows and gallery items intentionally use the classic WordPress editor so the metadata
|
||||
box remains visible and predictable. If the block editor appears for these objects,
|
||||
rebuild/recreate the WordPress container so the current must-use plugin is copied into
|
||||
the persistent `WORDPRESS_DATA_PATH` volume.
|
||||
|
||||
## A service cannot write to its volume
|
||||
|
||||
1. Stop the affected service.
|
||||
|
||||
@@ -20,7 +20,7 @@ function azionelab_register_content_types(): void {
|
||||
'edit_item' => 'Modifica spettacolo',
|
||||
),
|
||||
'public' => true,
|
||||
'show_in_rest' => true,
|
||||
'show_in_rest' => false,
|
||||
'menu_icon' => 'dashicons-tickets-alt',
|
||||
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'page-attributes' ),
|
||||
'has_archive' => false,
|
||||
@@ -39,7 +39,7 @@ function azionelab_register_content_types(): void {
|
||||
),
|
||||
'public' => false,
|
||||
'show_ui' => true,
|
||||
'show_in_rest' => true,
|
||||
'show_in_rest' => false,
|
||||
'menu_icon' => 'dashicons-format-gallery',
|
||||
'supports' => array( 'title', 'thumbnail', 'page-attributes' ),
|
||||
)
|
||||
@@ -47,6 +47,15 @@ function azionelab_register_content_types(): void {
|
||||
}
|
||||
add_action( 'init', 'azionelab_register_content_types' );
|
||||
|
||||
function azionelab_use_classic_editor_for_structured_content( bool $use_block_editor, string $post_type ): bool {
|
||||
if ( in_array( $post_type, array( 'azl_show', 'azl_gallery' ), true ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $use_block_editor;
|
||||
}
|
||||
add_filter( 'use_block_editor_for_post_type', 'azionelab_use_classic_editor_for_structured_content', 10, 2 );
|
||||
|
||||
function azionelab_add_meta_boxes(): void {
|
||||
add_meta_box( 'azl_show_details', 'Dettagli spettacolo', 'azionelab_show_meta_box', 'azl_show', 'normal' );
|
||||
add_meta_box( 'azl_gallery_details', 'Dettagli foto', 'azionelab_gallery_meta_box', 'azl_gallery', 'normal' );
|
||||
|
||||
Reference in New Issue
Block a user