Note: This article was originally published in 2010. Some steps, commands, or software versions may have changed. Check the current Technologies documentation for the latest information.
Prerequisites
Before you begin, make sure you have:
- WordPress installation (self-hosted)
- Administrator access to WordPress dashboard
- FTP/SFTP or file manager access to server files
To accomplish the above, just wrap your code in these tags: `
your code here
` The language parameter controls how the code is syntax highlighted. The following languages are supported:
- actionscript3
- bash
- coldfusion
- cpp
- csharp
- css
- delphi
- erlang
- fsharp
- diff
- groovy
- javascript
- java
- javafx
- matlab (keywords only)
- objc
- perl
- php
- text
- powershell
- python
- r
- ruby
- scala
- sql
- vb
- xml
If the language parameter is not set, it will default to “text” (no syntax highlighting). Code in between the source code tags will automatically be encoded for display, you don’t need to worry about HTML entities or anything. Obtained from: http://en.support.wordpress.com/code/posting-source-code/
Summary
You’ve successfully learned post code to wordpress. If you run into any issues, double-check the prerequisites and ensure your Technologies environment is properly configured.
Related Articles
- [](/jetpack-jetpack-could-not-contact-wordpress-com-register_http_request_failed/)
- Changing file permissions and recommendations for WordPress in a Linux system
- How to: Clean your WordPress database from all the empty Yoast WordPress SEO meta data
- Cómo agregar lenguajes adicionales a tu instalación de Wordpress - Multisitio Multired localización