By default wordpress post editor is allowing forward slash character to be displayed in wordpress post as we normally use it for displaying links. But how to display backslash character in wordPress post when we require it for expressing directory paths which will only use backslash? Let us see the simplest way how to display backslash character in wordPress post.
The key of displaying characters in wordpress post is in the HTML mode. By changing from visual mode to HTML mode, using standard HTML ASCII codes for characters, we can display backslash easily. In standard HTML ASCII table, backslash character is represented by \ or \
Let say we want to display the text C:\Windows\System32 in wordpress post:
In HTML mode view, type the text as C:\Windows\System32
Do not change from HTML mode to visual mode after applying this ASCII code. Publish it immediately. Otherwise the code will be displayed as in C: \Windows\System32 in wordpress post.
Another way is to use syntax highlighter plugin for wordpress.