WordPress.org

Ready to get started?Download WordPress

Forums

Code Snippets
[resolved] Custom PHP code shown as HTML (4 posts)

  1. typoerorr
    Member
    Posted 1 year ago #

    Hi there,

    I am using Code Snippets and Insert PHP together with the Montezuma theme.

    The pages are able to resolve the PHP to generate dynamic content.

    However, the interesting thing is that the page also shows my PHP codes after the dynamic content.

    You can view it here

    Have everyone encountered this after upgrading to the latest version of Snippets?

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

  2. Shea Bunge
    Member
    Plugin Author

    Posted 1 year ago #

    I tried using the Insert PHP plugin along with Code Snippets on the Montezuma theme, and it works fine. This means that it must one of your snippets that is messing something up.

    Try adding the line

    define('CODE_SNIPPETS_SAFE_MODE', true);

    to your wp-config.php file (just under the WP_DEBUG line). Does the problem still occur? If not, then remove this line and go through activating your snippets one-by-one to see which one messes things up.

    If the problem is still happening, even with the line in wp-config.php, then it's not your snippets causing the problem. Try deactivating the Code Snippets plugin and see what happens.

  3. typoerorr
    Member
    Posted 1 year ago #

    I have deactivated Code Snippets plugin but the problem still persists.

    The issue seems to be with the loop function generating the queries from the database.

    I will have to figure it out. Thanks.

  4. typoerorr
    Member
    Posted 1 year ago #

    I manage to resolve the issue by using Allow PHP in Posts and Pages plugin instead of Insert PHP plugin. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.