WP-Syntax: Opening PHP tags
-
Does anyone know how to make code highlighting in WordPress keep the structure of a PHP code snippet in tact? Right now I can post PHP code (and any other code) and it will highlight fine, but WordPress always adds a space between the opening bracket (<) and the question mark(?) making the code snippet unusable without editing.
I know this is more of a WordPress issue, but there seem to be no answers for this question (which has been posted for several different versions of WordPress). I can use the htmlentity for the tags, but they get left as their entity when highlighted. If I write them the way they are to appear, the get spaced.
I would really love to be able to post highlighted PHP code without users having to edit every single < ?php in the post.
- The topic ‘WP-Syntax: Opening PHP tags’ is closed to new replies.