Check with seller How to Display Code Snippets in WordPress Post

Mark as spam misclassified duplicated expired offensive

Computer Published date: February 7, 2018

 


However, here we have the two most popular solutions to display code in the code box in WordPress post.


1. Using


tag – without plugin


Once you add the code shown below in CSS file of your WordPress site. After adding you may display the code snippet in the WordPress post or page using the tag. This code looks different from the normal text of your code.


pre


{


border: solid 1px #e1e1e1;


font-size: 1.2 em;


color: #AE4FC6;


margin: 10px;


padding: 10px;


background: #FFFED1


}


If you want to display the following code in the code box. Thus, all you need to write the following code in “Text Editor” of your WordPress site.


2. Using WordPress plugin


Here, lots of plugins are capable to display code snippets in WordPress post or page. You can search the WordPress Plugin Library using the keyword syntax highlighter. We found a plugin called Crane Syntax Highlighter.




  • Thus, to install this plugin you need to login to your WordPress site dashboard. And follow the steps as Dashboard>>Plugins>>Add New.




  • After that, type Crayon Syntax Highlighter in plugin search bar and click enter button.




  • However, in search results, you will see Crayon Syntax Highlighter plugin by Aram Kocharyan on your working window.




  • Further, Install and activate this plugin. Now, you are all set!




After this, you must be looking out for How to use crayon syntax highlighter.

Vote
Result 0 votes

List all items from this seller

Contact seller

Useful information

  • Avoid scams by acting locally or paying with PayPal
  • Never pay with Western Union, Moneygram or other anonymous payment services
  • Don't buy or sell outside of your country. Don't accept cashier cheques from outside your country
  • This site is never involved in any transaction, and does not handle payments, shipping, guarantee transactions, provide escrow services, or offer "buyer protection" or "seller certification"