More
    HomeDesign / DevHow to Display Backslash Character in WordPress

    How to Display Backslash Character in WordPress

    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 &#92 or \

    - Advertisement -

    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.

    - Advertisement -

    Another way is to use syntax highlighter plugin for wordpress.

    - Advertisement -
    WPTidBits
    WPTidBitshttps://wptidbits.com/
    Owner of WPTidBits. Totally in love with WordPress!

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here

    110FansLike
    761FollowersFollow