WordPress.org

Ready to get started?Download WordPress

Forums

Code Snippets
[resolved] snippet is not inserted, it's show: [testsnippet] (8 posts)

  1. egerlach
    Member
    Posted 1 year ago #

    Thx Shea Bunge for that plugin.

    But it does not work in 3.5.1: I wrote a simple snippet, my first snippet and activated it: all(1) active(1)

    In my page I insert: [testsnippet]
    I saved it, running that page resolved the output: [testsnippet] and NOT the code in snippet "testsnippet".

    I'm trying since one hour. Normally such a simple error is because of fault of the user (me!). But I checked anything some dozends of times! I changed the name of snippet. I deactivated, I activated again. No success!

    Perhaps not working in 3.5.1 ?

    Eckard

    http://wordpress.org/extend/plugins/code-snippets/

  2. egerlach
    Member
    Posted 1 year ago #

    I installed the plugin on a other 3.4.2 installation, its a network installation. I can't insert a new snippet! Klicking to "save" I get always the error message:

    Please provide a name for the snippet and its code.

    But I inserted a name! Anybody here working with code snippet version 1.7.1.2 ? Perhaps this version buggy? Has someone here a older version for me?

  3. egerlach
    Member
    Posted 1 year ago #

    I found older versions under "Developers". I tried 1.7.1 in WP 3.5.1. Same effect. I created new pages, only with [testsnippet] inside. No effect, only [testsnippet] is printed. "code snippet" seems not to be activated. But it is activated!!!

  4. egerlach
    Member
    Posted 1 year ago #

    I deactivated any other plugin. "code snippet" is the only activated snippet not. But no effect.

    WP is very new installed. I've tested standard theme "twenty eleven". Always the same,[testsnippet] is printed.

  5. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    Hmmm, Code Snippets 1.7.1.2 on WordPress 3.5.1 is working fine for me. Perhaps it's an incompatibility with one of your other plugins. Or maybe the snippet code you're trying to use is reacting with the plugin. Try temporarily deactivating all of your plugins to see it that fixes it. Otherwise, you can post your code here and I'll let you know if it might be messing something up. It's unlikely, but these things have happened before.

  6. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    If you can post the snippet code that you're using here, I can debug it to see if that is what is causing a problem. From what you've said, it can't be a theme or plugin incompatibility issue.

  7. egerlach
    Member
    Posted 1 year ago #

    Sorry to all! I though this would be "normal" Code snippets, but your snippet plugin serves something like functions in the functions.php !! It was a misunderstanding. I searched a plugin to souce out normal html-code. Some php plugins serve that.

  8. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    You are correct that this plugin is for functions.php snippets. You can still create shortcodes with this plugin, however:

    function testsnippet_shortcode( $atts, $content ) {
    	echo 'It works!';
    }
    add_shortcode( 'testsnippet', 'testsnippet_shortcode' );

    Refer to the Shortcode API docs for more information

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.