Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Image caption

  • Hello,

    https://postimg.cc/DmgGStZh

    In the actual page, CSS is used to output image CC as a link image.

    However, in the BLock editor, the text looks large like the link image.

    I don’t have a problem with the actual post, but it bothers me.

    Is it possible to make it look like a link image even on a block editor?

  • Hi there,

    how did you add the CSS?

    If it was added to the Customizer Additional CSS then you can add this PHP Snippet to your site:

    
    add_filter( 'block_editor_settings_all', function( $editor_settings ) {
        $css = wp_get_custom_css_post()->post_content;
        $editor_settings['styles'][] = array( 'css' => $css );
    
        return $editor_settings;
    } );
    

    If it was in a child theme then use this PHP Snippet instead:

    
    add_filter( 'generate_editor_styles', function( $editor_styles ) {
        $editor_styles[] = 'style.css';
    
        return $editor_styles;
    } );
    
  • Wow, thank you so much!

    The title is also different from the actual page, can it be applied?

    https://postimg.cc/K48gs6ZG

  • The Content Title doesn’t match front end styles.
    To do that you would need to use a snippet with some custom CSS specifically for the editor.

    eg,

    
    add_filter( 'block_editor_settings_all', function( $editor_settings ) {
      $css = '
      h1 {
        font-weight: 900 !important;
        font-size: 40px !important;
      }
      ';
      $editor_settings['styles'][] = array( 'css' => $css );
    
      return $editor_settings;
    } );
    
  • Thank you so much.

  • You’re welcome

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