Plugin to parse PHP code in WordPress ... Is there one?

7 replies
Hi Warriors,

Is there any plugin to parse PHP code in WordPress?

Would be helpful if you're using it yourself.

Thanks all!
#code #parse #php #plugin #wordpress
  • Profile picture of the author MalachaiGoodman
    I tried a plugin that would do this a year ago or so... It worked 90% of the time. The other 10% my code would be perfect but just wouldn't run.

    This is because the PHP code wasn't being run natively by the PHP interpreter. It was handed from Wordpress to the plugin, which in turn handed it to the interpreter.

    It was like playing the telephone game. That extra middle man (the plugin) got it mostly right, but occasionally stuff got lost in translation. I eventually got tired of banging my head against it.

    Instead, I discovered that it's insanely easy to create custom page templates in Wordpress. There's a tutorial here. Inside that template you can write all the PHP you want and it will be processed directly by the interpreter.

    All the Wordpress hooks still work just like you'd expect, so it's not that much extra work. I HIGHLY recommend this method and have used it with great success!
    {{ DiscussionBoard.errors[281658].message }}
  • Profile picture of the author kool
    Try execphp - I don't know if that is exactly what u are looking for. Using this you can insert php code in your posts. I have used it and it works

    Karuna
    Signature
    {{ DiscussionBoard.errors[281917].message }}
  • Profile picture of the author SuzanneH
    I use Exec-PHP:

    WordPress › Exec-PHP WordPress Plugins

    If I recall correctly, you have to turn off the visual editor in order for it to work. You turn it off by going to your user profile; you should see a check box with "Use the visual editor when writing." Uncheck it and save your changes.

    Suzanne
    {{ DiscussionBoard.errors[281937].message }}
    • Profile picture of the author Karen Keyes
      I'm using runPHP and not having any problems. I read about exec-php but opted out when I couldn't use the visual editor with it.
      {{ DiscussionBoard.errors[281943].message }}
      • Profile picture of the author Kelvin Chan
        Thanks guys ... so namely there are 2 plugins that are available:

        1) RunPHP
        2) ExecPHP (Not usable in visual editor)
        Signature

        {{ DiscussionBoard.errors[283357].message }}
  • Profile picture of the author TheRichJerksNet
    If you need a custom coded one because those 2 are not what you are looking for then let me know...

    James
    {{ DiscussionBoard.errors[283524].message }}
  • Profile picture of the author David Pankhurst
    As MIke mentioned, RunPHP does the job:

    no sq - runPHP Plugin for WordPress

    It's advantage is that you activate it only on pages you need it.
    {{ DiscussionBoard.errors[290107].message }}

Trending Topics