Plugin closed: switching to another plugin
-
Just a post for people who are looking to switch to another plugin now this ‘Code Syntax Block’ is closed.
I did some research on GitHub and found that the Syntax-highlighting Code Block (with Server-side Rendering) plugin, is a fork that is still in active development, so I gave it a try.
There was a little challenge deactivating this old plugin though. It made all existing code blocks invalid because it has added additional ‘underwater’ tags to code blocks. More about that here. I removed the excessive tags with the following database update statements (make sure you have a database backup if you are going to this!):
UPDATEwp_postsSETpost_content= REGEXP_REPLACE(post_content, '<code[^>]*>', '<code>');
UPDATEwp_postsSETpost_content= REPLACE(post_content, '<!-- wp:code {"lineNumbers":true} -->', '<!-- wp:code -->');This new plugin automatically detects the code language, so there is no need to revisit all code blocks to set the language.
You can set the background colour of code blocks in the customizer, but if you have a Gutenberg theme like Twenty Twenty-Five, there is no link to the customizer, so you need to go to the following url:
https://YourDomain.com/wp-admin/customize.php, you can find the settings under the ‘Colors’ toggle.Unfortunately there are no default settings for wrapping lines and showing line numbers, but it can be set with a small custom plugin.
The topic ‘Plugin closed: switching to another plugin’ is closed to new replies.