• Resolved Alexandre Gauvin

    (@pictogram)


    Hi,

    I’m not sure if it’s the place to put that.

    I’m actually working on a project for which I use Code Snippets to insert some functions in specific Elementor page.

    All is working correctly between CS and Elementor except when I’m using CS with the Posts Widget in Elementor causing the page to not save. Deactivating the snippets just let the page save correctly.

    I’m not sure if it’s an Elementor issue or a Code Snippets one.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Alexandre Gauvin

    (@pictogram)

    OK, here is a video explaining with more delails this issue.

    https://drive.google.com/file/d/1nzhdA7X2XVadwlLKKLMZaOylTbb1KP6d/view?usp=sharing

    Thanks for any help here.

    Plugin Author Shea Bunge

    (@bungeshea)

    Hello,

    My apologies for taking so long to take a proper look at this. Thank you for the video, it was very informative.

    I haven’t set up a similar situation for me to test on at this point, but I have an idea of what might be the problem. I notice that in your shortcode snippets, you are directly outputting HTML as part of the shortcode callback.

    However, when creating shortcodes, it’s important to make sure that all content is returned from the callback instead of printed to the output. This may be why Elementor is not saving when the shortcode snippets are active.

    To solve this problem, you can change your snippets to call ob_start(); before outputting any content, and add the line return ob_get_clean(); at the end. This will capture any content you output using output buffering, and return it as a string for WordPress to handle.

    Please let me know if you would like some extra assistance updating the snippets – if you would like to email me the code, or link it here, I can make the changes.

    If after changing the snippets this problem is still occurring, I’ll try setting up my own copy of Elementor to see if I can reproduce and debug the issue.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Conflict btw CS and Elementor’ is closed to new replies.