WordPress.org

Forums

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

  1. rajesh450
    Member
    Posted 2 years 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 2 years ago #

    > symbol converts to &gt

  3. WillBontrager
    Member
    Plugin Author

    Posted 2 years 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 2 years 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 2 years 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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Insert PHP
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags