Down a rabbit hole trying to post program code
Why are you sending me to a link that does not answer the question? What I want is simple: Quote program code in a blog post. I found your blog article http://en.blog.wordpress.com/2007/09/03/posting-source-code/, and it sends me to a page on “Codes” (which you conveniently lost track of now by sending me from page to page). It says <b>nothing</b> about <b>how</b> to enter program code even though the link specifically directed me their to “learn about the science of doing this” or words to that effect. This is why open source get such a bad rep.
I’ve tried to chase down various plugins that seem to no longer be supported and/or don’t seem to be in the official plugins directory in the first place. Other than using the pre tag, I don’t see any built in way to do it.
Thank you for wasting my time, WordPress!
The blog I need help with is whatisthisfile.wordpress.com.
Sorry it was hard to find the post you actually needed. Here it is:
The short answer is you use this syntax [code language="css"] your code here [/code]
and it works for a whole list of languages (all of which are shared on the first link.
Hope that solves the problem
Yes, that’s a lot more helpful. Thanks. Now I just wish they’d extend this capability into WP itself and not just on WordPress.com.
After two more hours of looking I finally, and almost by accident, found SyntaxHighlighter, which oddly enough has its own shortcodes but apparently can use the WP shortcodes as well. The name doesn’t really describe its function very well, and it is not on page one of (any of my) search results by any means.
Maybe this post will help someone else stumbling along and getting frustrated at it all, and especially if they have a mix of WordPress.com and self-hosted sites. It’s nice to be able to use the same shortcodes across platforms.
The topic ‘Down a rabbit hole trying to post program code’ is closed to new replies.