WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

PHP (3 posts)

  1. Red Deer Web Design
    Member
    Posted 4 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 4 years ago #

    disable the visual editor in your profile

  3. Red Deer Web Design
    Member
    Posted 4 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.