November 21st, 2018
Have you ever wanted to write code on a tablet in a Tesla? I have. Maybe not the most common problem, but since I want to work on this page, it would be nice to be able to edit some javascript. But getting Javascript into your Wordpress page is not something Wordpress does nicely by default.  It does have some nice plugins like Advanced Custom Fields which lets you put fields into your WP posts so that you can render them later in templates. So, essentially, it has a decent HTML editor.  But if you are like me, and you want to play with Javascript on your blog pages, then perhaps this plugin is right for you. The way I use it is:
  1. Install Advanced Custom Fields if you haven't already
  2. Install the acf-javascript plugin
  3. Add an ACF Javascript to my WP Posts called "code"
  4. In my WP Template put <script><?php the_field('code'); ?></script>
That is all.  This will enable you to write code like this:

Posted In:

ABOUT THE AUTHOR:
Software Developer always striving to be better. Learn from others' mistakes, learn by doing, fail fast, maximize productivity, and really think hard about good defaults. Computer developers have the power to add an entire infinite dimension with a single Int (or maybe BigInt). The least we can do with that power is be creative.