• pweaver

    (@pweaver)


    I am trying to insert php code using the Rich Editor with the latest version of WordPress.

    To do this I have download and installed a copy of Exec-php which allows me to insert php code with the tags <?php ?> or [?php ?]. It is recommended on the page I use the second if I’m using the Rich Editor because it will destroy the code otherwise.

    What i’m finding is that there appears to be no way to fully counteract the automatic changes of the editor. It puts in <br /> tags after each line, it automatically parses anything within < > tags, so if I want to echo an html tag, it is echo’d immediately to the text page, rather than when the php calls it.

    The functionality of the rich editor ( Gallery2 Support for example ) is great, but it seems like people wanting to do anything other than put text and images in posts get left out..

    Does anyone have a solution for this?

    My apologies if my post comes out misformed, first post..

Viewing 5 replies - 1 through 5 (of 5 total)
  • moshu

    (@moshu)

    RTE is not for people who want to write their own code.
    You either use the normal html editor and put in your code – or use the RTE and forget about writing code into the content.

    puppy18

    (@puppy18)

    yep, u need to turn off your RTE.

    ryebrye

    (@ryebrye)

    Could you just hit the “HTML” button and edit the source – paste it in there – or would the RTE still jack it up when you applied your changes to the source and then played around in the RTE?

    Chris_K

    (@handysolo)

    RTE would still “jack it up” when you Submit.

    Thread Starter pweaver

    (@pweaver)

    Thanks for the responses guys.

    Looks like in order to use things like WPG2 ( WordPress Gallery2 Plugin ) I’ll have to add the image first in the rich editor, then swap out if I want to fiddle with anything else.

    Yes it’s lazy using the plugin to insert thumbnails and whatnot, but it’s so very convenient.

    Again, My thanks to all who replied.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Insert PHP Code in Rich Editor’ is closed to new replies.