Code Snippets
[resolved] Code Snippets are showing in page top (3 posts)

  1. caseyfern
    Posted 4 years ago #

    I'm running Suffusion Theme (latest release 4.2.5) in WP 3.4.1 and tried installing Code Snippets - sounds ideal for what I'm doing!

    First result after activating my first snippet: Warning: Cannot modify header information - headers already sent by (output started at [redacted] domains/gardenlass.com/html/wp/wp-content/plugins/code-snippets/code-snippets.php(380) : eval()'d code:31) in [redacted]/domains/gardenlass.com/html/wp/wp-includes/pluggable.php on line 881

    The snippet was not yet included in a post and already it showed in the header space of both site and admin area.

    When I tried to change preferences on another plugin, WP Jump, the blog became inaccessible. I was able to back up to the previous screen and uninstall the plugin, regaining control of my blog.

    This plugin says it'll do exactly what I need, which is to embed php code inside posts and pages. The concept of managing snippets like posts is brilliant. Now if it'll just work..?


  2. Shea Bunge
    Plugin Author

    Posted 4 years ago #

    Firstly, Code Snippets is not for embedding PHP code in posts and pages. Snippets, when activated, run on every page of your site, all the time. They're essentially mini-plugins. If you need a plugin to embed PHP code in posts and pages, I would recommend a plugin such as Global Content Blocks. There are also many more out there.

    I'm sorry to hear that you're having trouble. It is most likely a problem with your snippet. Could you post the snippet's code here?

    There may also be a conflict with your theme. I'll do some tests with the Suffusion theme and see what happens.

  3. caseyfern
    Posted 4 years ago #

    Sorry, I cannot - it's got proprietary code within. But now that I know it's for putting on all pages, that takes it out of the running.

    Too bad since the concept of a snippets dictionary is absolutely perfect for what I need to do (embed mini-stores within posts, sometimes 3 or 4 to a post).

    Actually I was hoping to replace Exec-PHP and Sniplets with this since the dictionary is such a great improvement.

    Thanks for the quick response - and if you do ever extend this to a PHP embed for posts and pages, please keep me in mind.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic