WordPress.org

Ready to get started?Download WordPress

Forums

WordPress doesn't seem to convert < and > (4 posts)

  1. Wildzero
    Member
    Posted 8 years ago #

    Hi there,

    I just wrote a blog entry about a php script, and in word press when I used

    <?PHP

    It failed to output in the blog, when I look at the html it comes out like
    <!--P<br-->
    instead of
    <?PHP as it should.

  2. Wildzero
    Member
    Posted 8 years ago #

    Any solution?

  3. Kafkaesqui

    Posted 8 years ago #

    Are you expecting to run some PHP code, or are you just trying to display it?

    For the former, there are several plugins available that allow you to embed PHP in a post:

    http://codex.wordpress.org/Plugins/Posts_Formatting

    For the latter, you should be using character entities for the open and close brackets:

    &lt; = <
    &gt; = >

    Or (again!) take a look at the plugins that deal with formatting code in a post:

    http://codex.wordpress.org/Plugins/Posts_Formatting

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Did you try using the code tags around your PHP code?

Topic Closed

This topic has been closed to new replies.

About this Topic