WordPress.org

Ready to get started?Download WordPress

Forums

PHP (3 posts)

  1. Red Deer Web Design
    Member
    Posted 2 years ago #

    Hey guys,

    I'm using exec php, which works great, however when switching from visual to html, and back, it ruins the code.

    I am also using raw html... doesn't work for php.

    Original:
    [raw]<?php if ( is_user_logged_in() ) { echo 'test'; } else { echo 'test' ?>[\raw]

    After switching:
    [raw]<!--?php if ( is_user_logged_in() ) { echo 'test'; } else { echo 'test' ?>[/raw]

    It is essentially commenting out the php. :( Any ideas?

  2. cubecolour
    ɹoʇɐɹǝpoɯ
    Posted 2 years ago #

    disable the visual editor in your profile

  3. Red Deer Web Design
    Member
    Posted 2 years ago #

    Yea, I thought of that too, but I also have quite a few tables that just wouldn't be workable in HTML view.

    Any other ideas? Why does WP even start commenting the code out?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.