Wordpress syntax highlighting for R is a pain

Here’s some steps that work for me on Wordpress (v3.5)

  1. install the WP SyntaxHighlighter plugin via the Dashboard
  2. install the Lang Pack for WP SyntaxHighlighter. I did this by simply moving the contents of


    into the main plugin directory (from the command line actually) and then activating the Lang Pack that appeared in the plugins part of the dashboard. That gets us R code highlighting.

  3. Inelegantly remove the weird little green acknowledgements box that seems to clash with everybody’s theme colours by adding the lines

    SyntaxHighlighter.defaults['toolbar'] = false;

    directly before the two calls to


    in the file


Archived comments

From the Internet Archive

If you found this helpful...

ko-fi page


This page has an open-source license (Creative Commons BY-NC-ND)

Creative Commons License BY-NC-ND