Can’t add php script in page editor

  • Author
    Posts
  • #138015

    nliteagent
    Member

    How do you add a php code snippet to the html of a page? Everytime I click on “edit HTML” the new window pops up with the HTML code and I insert my php code. However, after saving, it deletes all the php. Is there something I’m missing?

    #138211

    You can’t if you have a wordpress.com blog as I explained in this thread https://en.forums.wordpress.com/topic.php?id=14569
    Wordpress.com is a wp-MU multiuser blogging platform and we cannot access our edit our underlying php files.

    If you have downloaded software from wordpress.org which is different from wordpress.com software then you are in the wrong forum go here -> http://wordpress.org/support

    #138212

    nliteagent
    Member

    not sure I quite understand the topic you posted, my theme works fine, it’s just trying to use php in the manage/pages tab

    #138214

    devblog
    Member

    If you wanna post examples of .php code, I’d suggest to use the ‘code’ view and then use <pre> tags:

    <pre>
       <php?
            echo "Hello World!";
       ?>
    </pre>

    HTH

    #138216

    Please post a link to your blog.

    #138217

    devblog
    Member

    If I understand the OP’s question, he’s trying to post samples of code (like what I’m doing on my wp.com blog). Hence, my suggestion above.

    #138219

    OOPS! sorry – I misunderstood {redfaced} :(

    #138220

    nliteagent
    Member

    yes, I did download from wordpress.org, sorry for the confusion

    #138221

    devblog
    Member

    It seems I misunderstood him… my bad.

    #138229

    @devblog
    *ROTFLOL* :D
    It does seem that the misunderstanding was not on this end at all.

The topic ‘Can’t add php script in page editor’ is closed to new replies.