10
How to Display Code on Your WordPress Site Effortlessly If one runs a blog and if it is associated with development, in case if the individual wishes to share code snippets on his blog, then displaying these codes in the blog is not a simple task. A raw code that is added into the posts, comments, or widgets is filtered by WordPress for security reasons. Most often if the user uses a display code on his website then that user is asked about the Syntax Highlighter plugin.

How to display code on your word press site effortlessly

Embed Size (px)

Citation preview

Page 1: How to display code on your word press site effortlessly

How to Display Code on Your WordPress Site

EffortlesslyIf one runs a blog and if it is associated with development, in case if the individual wishes to share code snippets on his blog, then displaying these codes in the blog is not a simple task. A raw code that is added into the posts, comments, or widgets is filtered by WordPress for security reasons.  Most often if the user uses a display code on his website then that user is asked about the Syntax Highlighter plugin.

Page 9: How to display code on your word press site effortlessly

How to Display Code on Your WordPress Site

EffortlesslyHow to Display Code on Your WordPress website without using Plugin

Most of the blogger those who do not run a development blog, do not often need to add code snippets in their post. Once in a blue moon if required the blog owner can add code by encoding the required code into HTML entities like the subsequent…

>?php echo ” Hi How Are You”; ?<

The issue with converting code into HTML entities is that it is tough to do it manually, but there are many tools that can be used Encode the code into HTML entities.

After converting the PHP, JavaScript code into HTML entities they can be pasted into the WordPress post. If additional styling is required, then wrap the code sandwiched between <code> and </code> tags.