I want to write some python code in a wordpress blog but whitespaces are not preserved. Can some one please tell me how to write my python code in the blog with the proper indentation and styling preserved as indentation is very important for python code.
Use html <code>
tag.
You can also try this very good plugin for code highlighting in WP.
WP-SynHighlight
And for blog hosted on wordpress.com:
As perfect answer on this stack post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With