- This topic has 14 replies, 4 voices, and was last updated 1 year, 8 months ago by Jacob.
-
AuthorPosts
-
September 26, 2021 at 7:59 pm #1943819Jacob
Hi again.
When using Gutenberg oyu give the option to turn of the post title. But I do not want it in the editing interface at all. Do you have a way to remove it ? I mean – I can always add a Heading to the page or post myself, so it just clutters and messes with the almost clean full-page editing experience we know from page builders.
Can you fix it ? Will you incorporate this in the future ?
September 26, 2021 at 8:16 pm #1943836ElvinStaffCustomer SupportHi Jacob,
The theme doesn’t control the UI fields and layout of Gutenberg Editor.
At most, GP Premium only adds Layout Metabox to the UI but the rest is either WordPress core UI or from another plugin.
To add: it’s actually important to leave the post title field enabled and have it filled because SEOs fetch this value for the metadata. If you turn this field off, there’d be no way to add the post title conveniently. The posts will literally have no title.
While I understand that you can always add an H1 element inside the content, that h1 tag is content. It’s not a post title WordPress can dynamically fetch for SEO and post listing purposes. π
September 26, 2021 at 8:19 pm #1943837JacobI know. But in elementor they do not display title when editing. The titletag is preserved and set elsewhere. But when making a landing page it frustrates me to have it their.
September 26, 2021 at 8:31 pm #1943843ElvinStaffCustomer SupportThe quickest workaround is by running this PHP snippet to your site.
add_action( 'enqueue_block_editor_assets', function() { $css = '.edit-post-visual-editor__post-title-wrapper { display: none; }'; wp_add_inline_style( 'generate-block-editor-styles', $css ); }, 100 );
This basically adds this CSS to the block editor:
.edit-post-visual-editor__post-title-wrapper { display: none; }
Which hides the post title fields to all things you edit within Gutenberg.
September 26, 2021 at 8:35 pm #1943848JacobIn code snippets plugin or what do you mean, when you say “running this php snippet to your site” ?
September 26, 2021 at 8:46 pm #1943854ElvinStaffCustomer SupportYes that’s right. You can paste the PHP snippet on a Code Snippets plugin or a child theme’s functions.php.
September 26, 2021 at 8:51 pm #1943858JacobAwesome. Checking later.
September 26, 2021 at 9:12 pm #1943868ElvinStaffCustomer SupportLet us know how it goes. π
September 27, 2021 at 12:03 am #1943939JacobAwesome. Worked. Of course it did. Thank you Elvin. Again.
September 27, 2021 at 4:31 pm #1944938ElvinStaffCustomer SupportNo problem. Glad to be of any help. π
August 12, 2022 at 11:24 pm #2311544MichaelHi gentlemen-
I tried Elvin’s fix and it doesn’t appear to work. I ran the snippet and still the content title still appears in the editor (although I’ve disabled the content title). Is there another solution? thanks!Please refer to the image here- https://pasteboard.co/QTCiKzMsK9dE.png
August 13, 2022 at 9:10 am #2311922DavidStaffCustomer SupportHi there,
you can try this PHP Snippet to hide the title in the editor:
add_filter( 'block_editor_settings_all', function( $editor_settings ) { $css = '.edit-post-visual-editor__post-title-wrapper { display: none; }'; $editor_settings['styles'][] = array( 'css' => $css ); return $editor_settings; } );
August 13, 2022 at 10:49 pm #2312211MichaelDavid! That snippet did the trick.
thank you!August 14, 2022 at 5:56 am #2312426DavidStaffCustomer SupportYou’re welcome
August 14, 2022 at 8:47 am #2312673JacobCwicly π
Notice the Add Title in the top – Cwicly is awesome. Full on Gutenberg.
-
AuthorPosts
- You must be logged in to reply to this topic.