• Hello,
    I’ve created a custom enclosing shortcode. It works in the Classic editor, but when I inserted it into a Divi builder, it does not work properly.
    My shortcode is an enclosing shortcode (I followed this tutorial: https://developer.www.ads-software.com/plugins/shortcodes/enclosing-shortcodes/).
    For example:
    [my_shortcode]
    here’s the content
    [/my_shortcode]
    I added the open and closing code to Divi builder as a code module. The content is another modules (text, image, etc). The problem is the closing shortcode prints out the screen “[/my_shortcode]”.
    My minimal code is that:

    
    function lsz_init() {
    add_shortcode('my_shortcode', 'lsz_shortcode'); 
    }
    add_action( 'init', 'lsz_init' );
    function lsz_shortcode($param, $content =null) {
    return $content;
    }
    

    The general problem is that Divi ads its shortcodes also to the content, and these mixed. May be I have to parse somehow, but I have no idea how. Do you have any good example for that?
    Membermouse did it, they parse it using _content filter. This code is not open source, so I can’t check it.
    Thanks for your help!

Viewing 1 replies (of 1 total)
  • Moderator James Huff

    (@macmanx)

    Since that is a commercial theme, we ask that you please go to their official support channel, so you can get support from the people who know it best: https://www.elegantthemes.com/contact/

    Forum volunteers are not given access to commercial products, so they would not know how it operates. Other community members who may have faced your issue might be able to help you but your best bet is your product’s developer. Keep in mind we encourage you to use the official support venues, as it allows the developers to be aware of issues with their code and gives back to the community in a more robust way.

Viewing 1 replies (of 1 total)
  • The topic ‘parse enclosing shortcode in a visual editor (e.g. Divi)’ is closed to new replies.