[Support request] When editing in Gutenberg remove the title from the editing interface

Home Forums Support [Support request] When editing in Gutenberg remove the title from the editing interface

Home Forums Support When editing in Gutenberg remove the title from the editing interface

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1943819
    Jacob

    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 ?

    #1943836
    Elvin
    Staff
    Customer Support

    Hi 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. πŸ™‚

    #1943837
    Jacob

    I 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.

    #1943843
    Elvin
    Staff
    Customer Support

    The 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.

    #1943848
    Jacob

    In code snippets plugin or what do you mean, when you say “running this php snippet to your site” ?

    #1943854
    Elvin
    Staff
    Customer Support

    Yes that’s right. You can paste the PHP snippet on a Code Snippets plugin or a child theme’s functions.php.

    https://docs.generatepress.com/article/adding-php/

    #1943858
    Jacob

    Awesome. Checking later.

    #1943868
    Elvin
    Staff
    Customer Support

    Let us know how it goes. πŸ˜€

    #1943939
    Jacob

    Awesome. Worked. Of course it did. Thank you Elvin. Again.

    #1944938
    Elvin
    Staff
    Customer Support

    No problem. Glad to be of any help. πŸ˜€

    #2311544
    Michael

    Hi 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

    #2311922
    David
    Staff
    Customer Support

    Hi 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;
    } ); 
    #2312211
    Michael

    David! That snippet did the trick.
    thank you!

    #2312426
    David
    Staff
    Customer Support

    You’re welcome

    #2312673
    Jacob

    Cwicly πŸ™‚

    Notice the Add Title in the top – Cwicly is awesome. Full on Gutenberg.

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.