WP Converting Code Formatting
-
Posting a code blog has always seemed to be somewhat of a difficult thing to do (many blogs don’t support syntax highlighting, for one). I like WP and I have SyntaxHighlighter Plus installed and thought everything was going pretty well on my first blog post. Unfortunately, upon the first draft save all of the code formatting was converted by WP. Normally this is fine, but not for code snippets.
Before saving the draft: https://shinytype.com/images/code-good.jpg
After saving the draft: https://shinytype.com/images/code-bad.jpg
(note that I do not use the visual editor)Am I missing something?
Here’s how that blog of code looks like in the HTML editor:
[PHP]<?php
$server = ""; // aka "localhost" or "69.249.73.42"
$username = ""; // aka "ChuckNorris"
$password = ""; // aka "Eatsnails4_breakfast"
$database = ""; // where you want your new table to gomysql_connect($server, $username, $password) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());
?>[/PHP]I’d be totally bummed if I have to build a blog by hand to make this work, so I hope it’s just something I’m not quite attune to quite yet. Thank you!
- The topic ‘WP Converting Code Formatting’ is closed to new replies.