0

I am trying to use the WordPress pages but WordPress is overwriting certain characters.

the '>' character is turned into '& gt;'

why is WordPress changing these characters? is it possible to turn character conversion off for certain pages?

  • 4
    I would STRONGLY recommend against plugins that allow PHP to be embedded in content – Tom J Nowell Aug 29 '14 at 16:08
3

What you are doing is incredibly dangerous. You can break your site horribly, or have your entire server hacked. With a PHP in content plugin there is nothing stopping an editor from copy pasting a PHP shell in to the content editor and taking full control of your site.

If you have content on a page and want to include custom code, you should use one of the following:

  • shortcodes
  • custom page templates
  • hooks and filters, e.g. the_content
  • custom template functions
  • custom metaboxes and associated code

There are many alternatives, all well documented and with hundreds of questions asking how to do them from new developers on this site alone. I encourage you to ask!!

You should NEVER use plugins that let you put PHP code inside your posts. If I were to do this, I would face immediate dismissal from my job. I urge you to consider alternatives.

  • 1
    i.imgur.com/lNEg8.gif – TheDeadMedic Aug 29 '14 at 16:27
  • I need to include custom content and custom code on a certain page. I was asked to just use the WP pages inside the admin. I don't work on WP. thanks for the heads up but This page is for admin users only and there is no posts inside the entire website, it's read-only for public. i'll try to find a different solution. never answered my question though :P – 4554545434 Aug 29 '14 at 16:30
  • "[You] never answered my question though" -- I would argue that "You should NEVER use plugins that let you put PHP code inside your posts" is your answer. – Pat J Aug 29 '14 at 18:38
  • Even if your PHP in content plugin is restricted to a single person, in a single country, on a single browser, with a single login, at a particular time of day, of a certain age, on a certain browser, from a certain ISP, on a certain OS, it is still a cardinal sin. I can say without doubt that PHP in content is an abomination, and that I can say any word of any severity that I want and it would still be applicable. It is about the worst thing that you can ever do in any PHP application nevermind WordPress specific. I give you the benefit of the doubt as someone who knows no better – Tom J Nowell Aug 29 '14 at 23:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.