Horje
Syntax Highlighter for WordPress using Highlight.js. Wordpress Tutorial

Noted That:

  • To install correctly this wp-syntax-highlighter.zip .
  • Fisrt Download the wp-syntax-highlighter.zip to your computer
  • Extract/Open wp-syntax-highlighter.zip to Your Computer.
  • Then, Find readme.txt file inside wp-syntax-highlighter.zip and Open readme.txt .
  • Now, Read the Requirements of this plugin. Which Wordpress Version and PHP Version are required to run this Plugin in Your Wordpress Site.
  • Then, Follow the Tips Below.

Start the Tips:

1. First Download " wp-syntax-highlighter.zip " Plugin to your Local Computer. (Click Download)

2. Then, Login to your " yourdomain.com/wp-admin " Dashboard.

/stack/wp/e1593231376d7d849d2-4597-4fa3-a6ff-1eca18f72aab.png

3. Then, Click on " Plugins " + " Add New " from left sidemenu of Dashboard.

/stack/wp/e1593231378Screenshot20.png

4. Now, Click on "Upload Plugin" button.

/stack/wp/e1593231380Screenshot-2019-4-2AddPluginsHorjeWordPress.png

 

5. Now, Browse " wp-syntax-highlighter.zip "  Downloaded plugin from your computer, Where you downloaded wp-syntax-highlighter.zip According to Step – 1 Above then, click on " Install Now"

/stack/wp/e15931461531577025694plugin.png

6. Now, Click on " Active Plugin"

/stack/wp/e15932313830ca45529-bf73-4101-8178-53ae60ce549f.png

7. Then, See left sidemenu. " wp-syntax-highlighter " folder is added on left sidemenu. Now, Click on " wp-syntax-highlighter " folder.

   Noted that: If you do not see " wp-syntax-highlighter " folder on left sidemenu then, see at left sidemenu " Settings " or " Tools ".

8. Now you configure yourself oR Watch video tutorial below about  wp-syntax-highlighter Configurtions and Settings or How to work " wp-syntax-highlighter " in your WordPress site.

 

oR

After Activated Plugin According to Step-6 then,

  1. Go to " Plugins " + " Installed Plugin " from Wordpress Admin Panel Leftside Menu.
  2. or Direct go to: https://yourdomain/wp-admin/plugins.php
  3. Then, Find " wp-syntax-highlighter " Activated Plugin from Plugin List.
  4. Then, Click on " Settings " from Plugin that is wp-syntax-highlighter
  5. Now, Edit/Add/Config the setting and Click on " Save Changes " button,
WP Plugin Setting



Guide
  1. Click Plugins > Add New in the WordPress admin panel.
  2. Search for “wp-syntax-highlighter” and install.

Customization

The plugin comes bundled with all the themes provided by Highlight.js.
Use the Theme dropdown to change the selected theme.

Additionally the plugin checks for a custom.css in your current
theme’s directory at {current_theme}/wp-syntax-highlighter/custom.css .

If this CSS file is present it will be added to the page automatically.
You can override any builtin theme’s styles in this manner.

To use a completely custom theme use the Custom option in Theme
dropdown. Now only your current theme’s custom.css will be used to style
the code blocks.

Shortcodes

Each language gets it’s own shortcode. You can use this to add code
blocks for that language into your posts.

For instance to add some PHP code into your post use,


 [php] foreach ($requirements as $requirement) { $result = array( 'satisfied' =>
 $requirement->
check(), 'requirement' =>
 $requirement ); array_push($results, $result); if (!$result['satisfied']) { $success = false; } } [/php]

Supported Languages

The following languages are currently supported by highlight.js.

  1. 1c
  2. Actionscript
  3. Apache
  4. Applescript
  5. Asciidoc
  6. Autohotkey
  7. Avrasm
  8. Axapta
  9. Bash
  10. Brainfuck
  11. Clojure
  12. Cmake
  13. Coffeescript
  14. Cpp
  15. CS
  16. CSS
  17. D
  18. Delphi
  19. Diff
  20. Django
  21. Dos
  22. Erlang
  23. Erlang-repl
  24. Fix
  25. Fsharp
  26. Glsl
  27. Go
  28. Haml
  29. Handlebars
  30. Haskell
  31. Http
  32. Ini
  33. Java
  34. Javascript
  35. JSON
  36. Lasso
  37. Lisp
  38. Livecodeserver
  39. Lua
  40. Makefile
  41. Markdown
  42. Mathematica
  43. Matlab
  44. Mel
  45. Mizar
  46. Nginx
  47. ObjectiveC
  48. Ocaml
  49. Oxygene
  50. Parser3
  51. Perl
  52. Php
  53. Profile
  54. Python
  55. R
  56. Rib
  57. Rsl
  58. Ruby
  59. Ruleslanguage
  60. Rust
  61. Scala
  62. Scilab
  63. SCSS
  64. Smalltalk
  65. SQL
  66. Tex
  67. Vala
  68. Vbnet
  69. Vbscript
  70. Vhdl
  71. XML

Note: Since WordPress shortcodes must be at least 2 characters long, for
language names shorter than 2 characters use the lang suffix.

Eg:- [dlang][/dlang]

Compatibility with other Syntax Highlighters

The plugin is completely compatible with other syntax highlighters.
It does not change the content of your existing posts. You can safely go
back to use your previous syntax highlighter after trying out
wp-syntax-highlighter.

Both Syntax Highlighter and GeSHi
and supported by default. Prism based syntax highlighters will also
work out of the box as they utilize the same markup as Highlight.js.


syntax , highlighter , using , highlightjs , tutorial ,

Name

Read Article
https://develop.horje.com/learn/1434/reference