Support » Plugin: Code Snippets » Breaks Site, can’t deactivate Snippet

  • Unfortunately this Plugin broke me website by using PHP Code. I couldn’t deactivate the Code Snippet so i had to uninstall the Plugin.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Shea Bunge


    This plugin gives you the freedom to create your own snippets, but unfortunately this means that the responsibility for not writing bad code that breaks your site is on you.

    We include a safe mode feature to make it easy to recover from issues like this without needing to uninstall the plugin. You can read more about it here:

    I’d definitely recommend exploring the existing resources for solutions like these or asking a question in the support forum when you encounter issues in the future, instead of jumping straight to the review section.

    Plugin Author Shea Bunge


    Apologies, I posted the wrong URL. The correct link is

    Actually, the code I was using when the site broke was valid:

    <?php if( get_field('subtext') ): ?>
    <p><?php the_field('subtext'); ?></p>
    <?php endif; ?>

    So I’m not sure how this simple piece would’ve caused the site to break.



    My wild guess: it broke because of the PHP tags. You are not working in a HTML editor here that would demand the tags. You do work in a PHP editor and especially the closing PHP tag cuts off further PHP code outside your snippet which easily breaks sites.
    Please take a first attempt at omitting PHP tags and report back the result.

    • This reply was modified 7 months ago by Sven71.


    As a starter:

    $subtext = get_field( ‘subtext’ );
    if ( $subtext ) {
    $response = ‘<p>’ . esc_html( $subtext ) . ‘<p>’;
    echo $response; // output the HTML

    Nothing more. No PHP open / close tags in code snippet editor to be added by you.



    Thank you, @roaddoc.

    Unfortunately, that wasn’t the situtation when I attempted to use it.



    Hm, I don’t remember Code Snippet to work otherwise ever and I’ve used it for years now. Anyhow, if the problem is solved whatever way then I guess this thread can be closed.

    Plugin Author Shea Bunge


    Hi @toad78,

    This is a review, not a support thread. If you’d like some assistance with using the plugin, we’d be happy to help, but we do ask that each issue has its own thread to make things easier to follow.

    Plugin Contributor Verdi Heinz


    Hello @deno1, Thank you for leaving a review of our product. We appreciate your feedback, and we’re sorry to see that you left a low rating. We always strive to provide a great user experience, and we want all of our customers to be happy with our product.

    We hope the support you received here led to a solution. If there is any other thing that we can do to improve your experience, please let us know.

    Also, we would like to mention that our product is completely free of charge, and we hope that this may encourage you to reconsider your rating as it means a lot to a small team like ours.

    Thank you again for choosing our plugin, we look forward to serving you in the future. Kind regards, Verdi

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Breaks Site, can’t deactivate Snippet’ is closed to new replies.