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.

How to best implement a syntax highlighting block

  • Hello there,
    I’d like to include a mock “terminal” on a website, and inside that I’d like to have some code with syntax highlighting. I have a good idea on how to create the terminal with GenerateBlocks, but I don’t know how to do the syntax highlighting part. Should I just use a code block inside my container and a syntax highlighting plugin? Are you aware of a plugin that would be able to work on a GB headline block (targeted through its css class maybe)?
    Kind regards,
    Gunnar

  • Hello there,

    Yes, using a plugin may be better for this.

    I found this plugin which may help: https://wordpress.org/plugins/code-syntax-block/

    It seems to be an extension for the WP Code Block to include syntax highlighting.

    Hope this helps!

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