WordPress.org

Ready to get started?Download WordPress

Forums

Insert PHP
Conflict with Grater than and less than dymbols (5 posts)

  1. rajesh450
    Member
    Posted 11 months ago #

    Hi actually i have a code like this.$one->post_date
    after entering it if we just click on visual tab and come to text box >symbol converts to > and code is not executing. Can u give me solution.

    http://wordpress.org/extend/plugins/insert-php/

  2. rajesh450
    Member
    Posted 11 months ago #

    > symbol converts to &gt

  3. WillBontrager
    Member
    Plugin Author

    Posted 11 months ago #

    Enter the PHP code in the "HTML" or "Text" tab (depending on which version of WordPress you're using).

    If you later go to the "Visual" tab and click the "Update" button, then yes it will turn > into &gt ; and < into &lt ;. Any & characters will also be converted to &amp ;

    It's what the Visual tab does - turns certain special characters into HTML entities to make them into visible characters.

    If you need to update something with the Visual tab, then afterward you'll need to go to the HTML or Text tab and fix the PHP code that had its >, <, &, or other special characters converted.

    Will

  4. rajesh450
    Member
    Posted 11 months ago #

    dont we have another option for this. Because i have to change the &gt at 50 places in a single page. If i add a photo in visual tab, then i have to change &gt to > at 50 places. So.........

  5. WillBontrager
    Member
    Plugin Author

    Posted 11 months ago #

    It's how wordpress works. If you use the Visual tab and click update, it will convert characters to they are visual.

    An alternative may be to put the PHP script in a separate file, then use Insert PHP to include the file in your post or page.

    Will

Reply

You must log in to post.

About this Plugin

About this Topic

Tags