Title: PHP to WordPress
Last modified: August 20, 2016

---

# PHP to WordPress

 *  [JohnthePilot](https://wordpress.org/support/users/johnthepilot/)
 * (@johnthepilot)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-to-wordpress/)
 * Hi Guys,
 * We use WordPress to publish articles submitted by authors on our main forum. 
   These are written in PHP and normally we can do a straight copy-and-paste, but
   when an author has used the [php][/php] code, whereas in vBulletin it shows as
   scrollable boxes, WordPress shows the code as straight text without any of the
   original formatting. Any ideas how to overcome this would be appreciated.
 * Regards,
    JohnthePilot.

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Thread Starter [JohnthePilot](https://wordpress.org/support/users/johnthepilot/)
 * (@johnthepilot)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340117)
 * Having just seen the note below, here are the links to the two versions of the
   article in question.
 * [http://www.techsupportforum.com/forums/f214/secure-apache-web-server-663153.html](http://www.techsupportforum.com/forums/f214/secure-apache-web-server-663153.html)
 * [http://www.techsupportforum.com/5369-secure-apache-web-server/](http://www.techsupportforum.com/5369-secure-apache-web-server/)
 *  Moderator [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340166)
 * try using one of the many syntax highlighter plugins such as [http://wordpress.org/extend/plugins/crayon-syntax-highlighter/](http://wordpress.org/extend/plugins/crayon-syntax-highlighter/)
 *  Thread Starter [JohnthePilot](https://wordpress.org/support/users/johnthepilot/)
 * (@johnthepilot)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340275)
 * Thanks cubecolour but that didn’t resolve the problem I’m afraid.
 *  Moderator [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340398)
 * I’m not sure of exactly what you are trying to achieve.
 * Can you explain in more detail?
 *  Thread Starter [JohnthePilot](https://wordpress.org/support/users/johnthepilot/)
 * (@johnthepilot)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340399)
 * If you look at the links in post #2 these should explain. The first link is as
   the author wrote it in vBulletin. The scrollable boxes are created by surrounding
   the text with the BB tags `[php][/php]` The second link shows what happens when
   the post is copied to WordPress.
 *  Moderator [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340400)
 * The first link only shows a forum login screen so I cannot see the example
 *  Thread Starter [JohnthePilot](https://wordpress.org/support/users/johnthepilot/)
 * (@johnthepilot)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340401)
 * That’s strange because they are public forums. Anyway, I’ve uploaded images of
   the two pages with ImageShack. I don’t seem able to preview the post so I hope
   they are OK.
 * [URL=http://imageshack.us/photo/my-images/194/apacheserverinhtml.jpg/][IMG]http://
   img194.imageshack.us/img194/350/apacheserverinhtml.jpg[/IMG][/URL]
 * [URL=http://imageshack.us/photo/my-images/687/apacheserverinwp.jpg/][IMG]http://
   img687.imageshack.us/img687/3291/apacheserverinwp.jpg[/IMG][/URL]
 *  Thread Starter [JohnthePilot](https://wordpress.org/support/users/johnthepilot/)
 * (@johnthepilot)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340445)
 * Were you able to see the difference in the two images above?
 *  [michael.mariart](https://wordpress.org/support/users/michaelmariart/)
 * (@michaelmariart)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340446)
 * The [php][/php] shortcode isn’t a standard WordPress one. If it’s in your system
   now you’ll need to track down where it’s being added into your site and work 
   from there. My guess is that you don’t have a PHP formatter set up in WordPress,
   where your forum software does.
 *  Moderator [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340448)
 * There may already be a plugin that can do this. There are several codes that 
   are tagged with ‘ BBCODE’ [http://wordpress.org/extend/plugins/tags/bbcode](http://wordpress.org/extend/plugins/tags/bbcode)
   one of those may be appropriate, but the BBCODE plugins I have seen tend to provide
   basic BBCODE formatting ( bold, italic etc) but not the more specialised codes
   like PHP
 * If there is no syntax highlighter or bbcode plugin that already provides what
   you require, you need to write or commission someone to write a custom plugin.
 * There’s a tutorial for creating a syntax highlighter at [http://wp.tutsplus.com/tutorials/plugins/adding-a-syntax-highlighter-shortcode-using-prism-js/](http://wp.tutsplus.com/tutorials/plugins/adding-a-syntax-highlighter-shortcode-using-prism-js/)
 * This might work as a starting point – ie change the [ code ] shortcode to a [
   php ] shortcode and maybe include some css rules to format the container element
   for the php code at a fixed height with [overflow: auto](http://www.w3schools.com/cssref/pr_pos_overflow.asp)
   to give you the code within a scrolling box
 *  Thread Starter [JohnthePilot](https://wordpress.org/support/users/johnthepilot/)
 * (@johnthepilot)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340453)
 * OK. Many thanks for your help.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘PHP to WordPress’ is closed to new replies.

## Tags

 * [Php to wordpress](https://wordpress.org/support/topic-tag/php-to-wordpress/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 11 replies
 * 3 participants
 * Last reply from: [JohnthePilot](https://wordpress.org/support/users/johnthepilot/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/php-to-wordpress/#post-3340453)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
