20 Ways To Make $5000+ From Home. Earn Now!

Table of Content

How To Display Code In Wordpress Site

How To Display Code In Wordpress Site,best syntax highlighter tutorial tip trick for wordpress website blog,easily display codes in wp from plugin
How To Display Code syntax highlighter In Wordpress Site
Showing codes in your WordPress is not easy.In this article,we will tell you how to display syntax highlighter code on your wordpress site.
First you need to install and activate the Synatx Highlighter Evolved plugin. After activation, you need to go Settings » Syntax Highlighter to configure the plugin settings.
Wordpress syntax highlighter code display settings page
 Each option has detailed description to explain what it does. Once you are done, simply click on the save changes button to store your settings.Syntax Highlighter evolved plugin uses simple shortcodes to display code. For each language you need wrap your code in the shortcode for that language.
Example:
For PHP you will wrap your code like this:
[php]
<?php
echo “Hello”;
?>
[/php]
For CSS you will wrap your code like this:
[css]
.entry-title {
font-family:”Open Sans”, Times, sans-serif;
font-size:12px;
color:#FF3333;
}
[/css]
Syntax Highlighter will automatically highlight the code. It will also add line numbers and handle tab indent properly. Users will be able to easily copy and paste code snippets from your WordPress website.

How to Display Code in WordPress Without Using Plugin

you can add code by encoding the code into HTML entities.
Example:
&gt;?php echo "Hello World"; ?&lt;
To convert code into HTML entities you can use our tool from here.After converting PHP, HTML, JavaScript code into HTML entities, you can paste them into your WordPress posts. For additional you can wrap your code between <code> and </code> tags.

We hope this article helped you find the best Display code syntax highlighter plugin for WordPress.If you liked this article you can Join us on Facebook,Twitter,Google Plus.

Post a Comment