| Latest 7 Posts |
Increasing the number of posts per page on category, tag, and archive pages in WordPress Thu, Aug 18th 2011 89
|
Zero day vulnerability in many WordPress themes Wed, Aug 3rd 2011 55
|
WordPress XML Sitemap Plugin Review Tue, Aug 2nd 2011 74
|
How to display nicely formatted PHP code in a WordPress post Thu, Jul 21st 2011 88
|
Updating Price PHP print statements in Ubercart Tue, Jul 19th 2011 42
|
How to dynamically set Facebook Opengraph Meta tags in WordPress headers Fri, Jul 15th 2011 73
|
Theming fields in Drupal 6 Wed, Jul 6th 2011 103
|
| Top
10 |
Sorry, no records were found!
|
|
How to display nicely formatted PHP code in a WordPress post
david
I’ve been struggling for a while about how to embed PHP, HTML, or CSS code into WordPress posts so that they look good and are easy to understand.
I found this list of 12 WordPress Plugins to Display and Highlight Code.
I researched a few of them and finally settled on SyntaxHighlighter Evolved, which was simple to install, easy to use with short codes, formats nicely, and seems to have a large existing user base.
In your posts, you can simply use [php] and [/php] shortcodes around your actual PHP code and it does it’s trick. You can review the plugin page for the many various types of languages/syntax that are available.
I will spare your eyes and use this for all embedded code from now on.
--------------------- http://domino.symetrikdesign.com/2011/07/21/how-to-display-nicely-formatted-php-code-in-a-wordpress-post/ Jul 20, 2011 89 hits
| Recent Blog Posts |
Sorry, no records were found!
|