Title: Snippet code disappeared
Last modified: August 20, 2016

---

# Snippet code disappeared

 *  Resolved [Gedaly Guberek](https://wordpress.org/support/users/gedaly/)
 * (@gedaly)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/)
 * Love the plugin!!!
 * Since upgrading to 1.6 and WP 3.5, I’m unable to edit the snippet PHP code. I
   click on a snippet to edit and the edit page loads but the snippet text isn’t
   there. The space just shows up blank and I can’t get the cursor to show up.
 * [http://wordpress.org/extend/plugins/code-snippets/](http://wordpress.org/extend/plugins/code-snippets/)

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

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3312934)
 * I’ll have a look into this. It’s not a problem I’m experiencing. What other plugins(
   and what theme) are you using?
 *  Thread Starter [Gedaly Guberek](https://wordpress.org/support/users/gedaly/)
 * (@gedaly)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3312964)
 * I’ve got 2 sites with the same issue. Haven’t checked other sites yet…
 * Themes are Canvas and Capital from WooThemes.
    Plugins in common include Akismet,
   Contact Form 7, Digg Digg, and Yoast’s Google Analytics and SEO plugins.
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3312968)
 * That’s very strange, because I use all of those plugins on my personal site, 
   and Code Snippets is working fine. I’m not using those themes, though. If it’s
   no imposition, would you be able to post the source code of the page in between
   the `<div class="wrap"` opening and closing tags (or the whole page source) either
   on [GitHub](https://gist.github.com) or Pastebin or similar? It would make debugging
   this issue a whole lot easier.
 * Errors like this usually occur when two different versions of CodeMirror (which
   powers the textarea) are loaded on the same page. This wasn’t an issue when Code
   Snippets used CodeMirror 2 (which is used by many old plugins that use CodeMirror),
   but version 1.6 and up use CodeMirror 3.
 *  Thread Starter [Gedaly Guberek](https://wordpress.org/support/users/gedaly/)
 * (@gedaly)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3312969)
 * Sure. Here’s the edit page for a snippet on one site:
 * [https://gist.github.com/2e1fb7668ba9a7306d24](https://gist.github.com/2e1fb7668ba9a7306d24)
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3312974)
 * Hmm… it definitely isn’t a problem with the theme, and the other plugins don’t
   seem to be causing any trouble either. I will have a look into this.
 * What internet browser are you using?
 * Also, if it’s not too much to ask, could you please post a screenshot showing
   the snippet editor?
 * Thanks.
 *  Thread Starter [Gedaly Guberek](https://wordpress.org/support/users/gedaly/)
 * (@gedaly)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3312975)
 * Thanks so much.
 * I’m on a Mac with Firefox. Same thing happens in Chrome.
 * Screenshot: [http://www.gedaly.com/snippet-edit-admin.png](http://www.gedaly.com/snippet-edit-admin.png)
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3313007)
 * Can you write code on the _Snippets > Add New_ page? Do the line numbers show
   up there?
 * If you can add a new snippet, can you then edit it?
 *  Thread Starter [Gedaly Guberek](https://wordpress.org/support/users/gedaly/)
 * (@gedaly)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3313012)
 * Now it’s getting weirder.
 * My snippets that have been deactivated for a while I can edit. I can add new 
   ones and edit them. But the ones that have been active all this time can’t be
   edited whether they’re deactivated or not.
 * I’m thinking I should export them, delete them all and then import them again.
   What do you think?
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3313016)
 * Exporting, deleting, and importing sounds good. If that doesn’t work, you can
   try exporting, deleting the plugin so data is cleaned up, re-installing the plugin,
   and then importing the snippets back. It’d be nice if you let me know what works.
 *  Thread Starter [Gedaly Guberek](https://wordpress.org/support/users/gedaly/)
 * (@gedaly)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3313047)
 * I deleted and re-added. Still having a problem with one snippet. I’m thinking
   the code isn’t perfect, but I think it’s working still.
 * Was the import linked removed in the last update? It’s not showing up for me 
   in the sidebar anymore.
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3313048)
 * The import page has moved under _Tools > Import > Code Snippets_.
 * Having a look at the faulty snippet, perhaps you could try removing the closing(`?
   >`) and opening (`<?php`) PHP tags from your snippet and use `echo` instead?
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3313049)
 * Assuming the faulty snippet in question is the one displayed in the screenshot
   and on GitHub, you can try using this code:
 *     ```
       function aweber_single_post() {
       	if ( is_single() ) {
       		echo '<script type="text/javascript" src="http://forms.aweber.com/form/57/1350500557"></script>';
       	}
       }
   
       add_action( 'woo_post_after', 'aweber_single_post' );
       ```
   
 *  Thread Starter [Gedaly Guberek](https://wordpress.org/support/users/gedaly/)
 * (@gedaly)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3313050)
 * Awesome! I applied that to my other site and snippets, I think that fixed everything.
   Thanks!!! This is pretty much my new favorite plugin. 🙂

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

The topic ‘Snippet code disappeared’ is closed to new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [Gedaly Guberek](https://wordpress.org/support/users/gedaly/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/snippet-code-disappeared/#post-3313050)
 * Status: resolved