• I’m using Divi’s code module with [css][/css] inside and code not showing correctly anymore. I’ve tried other fixes for shortcode issues from other topics, currently the following is in my child theme:

    add_filter( ‘syntaxhighlighter_htmlresult’, function( $content ) {
    return str_replace(‘[‘, ‘[‘, $content);
    });

    didn’t fix anything, not sure what else to try. Divi does add <pre> html so maybe fix involves that (?) but this has never been an issue before. I’m using my own class, not sure if that makes a difference but doesn’t seem like it should.

    • This topic was modified 10 months, 3 weeks ago by monstertaco.
    • This topic was modified 10 months, 3 weeks ago by monstertaco.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Jay

    (@bluejay77)

    Hi @monstertaco,

    SyntaxHighlighter is designed to work with the default WordPress editor (either classic or block editor), so we cannot advise on how to integrate it with the 3rd party modules such as Divi.

    That said, it seems like you were using the wrong snippet I had shared in this comment; you should be using this snippet instead shared by our team: https://gist.githubusercontent.com/fjorgemota/8d8ad57079d15b278dcc8a1253b894f6/raw/6f35255bbaf0d73d13c4f12157c0bc0207ddbfb2/snippet.php

    Thread Starter monstertaco

    (@monstertaco)

    Thanks for that other snippet. Unfortunately it didn’t change anything on my end.

    I’ve been using this plugin on a Divi site for almost 8 years now I think, are you saying I’ve just been lucky it worked for me all that time? I don’t think the issue is that it’s Divi but that Divi uses shortcodes, and others seem to have had issues with shortcodes as well. I never had an issue until very recently either after a WordPress update or this plugin’s update, I’m not completely sure which triggered it to stop working.

    Plugin Support Jay

    (@bluejay77)

    Hi @monstertaco,

    As we push updates to fix bugs and introduce new features, people with various setup may experience things not working as expected. For some people, some of the ‘bugs’ might have been a feature that worked towards their own setup.

    That said, we’d like to take some steps back and get more information from you about what exactly is not working, so we can be on the same page. The goal here is to be able to reproduce the issue you’re facing.

    I’m using Divi’s code module with [css][/css] inside and code not showing correctly anymore.

    Would you specify what’s no longer working while using Divi? For example, is there a page showing the failure? What code snippet did you used to write with the shortcode?

    In other words, is it Syntaxhlighlighter that breaks Divi’s code block, or does Syntaxhlighlighter no longer highlight code in the Divi code block?

    For detailed reports and steps to reproduce, we recommend posting on our GitHub repository, using our Bug report issue template here: https://github.com/Automattic/syntaxhighlighter/issues/new?assignees=&labels=%5BType%5D+Bug&projects=&template=bug_report.md&title=

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Update not working with Divi’ is closed to new replies.