• Resolved macnux

    (@macnux)


    Hi,

    I installed the plugin and I have many code tags, but I can’t see any change!!
    What should I do to make the server rendering work?

    Regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    You have to use the Code block the block editor (aka Gutenberg). It does not do anything with code tags on their own.

    Thread Starter macnux

    (@macnux)

    Thanks for reply!

    What about the existing code tags?
    I have hundreds of articles that contain code snippets.
    I can do any regex replacement for the entire database if needed.
    Regards,

    Plugin Author Weston Ruter

    (@westonruter)

    You will need to convert your content over to blocks. Existing code tags will not be processed by this plugin.

    Thread Starter macnux

    (@macnux)

    I edit one of my current posts using block editor and I add a new code block and add some code and save and no code highlight!!

    Thread Starter macnux

    (@macnux)

    Also, I use the following code in functions.php of my template to change the default theme:

    add_filter(
    	'syntax_highlighting_code_block_style',
    	function() {
    		return 'github';
    	}
    );

    But nothing changed.

    Plugin Author Weston Ruter

    (@westonruter)

    In the block editor, please switch to the code editor and copy the text content here.

    Do you see code like:

    <!-- wp:code -->
    <pre class="wp-block-code"><code>echo "Hello World!";</code></pre>
    <!-- /wp:code -->
    Plugin Author Weston Ruter

    (@westonruter)

    Try also setting some of the options, like showing line numbers, adding line wrapps, and setting the language:

    <!-- wp:code {"language":"php","showLineNumbers":true,"wrapLines":true} -->
    <pre class="wp-block-code"><code>echo "Hello World!";</code></pre>
    <!-- /wp:code -->

    Please confirm these settings are shown and are being applied.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘plugin not working’ is closed to new replies.