Title: Shortcode within Craton Code
Last modified: August 21, 2016

---

# Shortcode within Craton Code

 *  [WP CMS Ninja](https://wordpress.org/support/users/billiardgreg/)
 * (@billiardgreg)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/shortcode-within-craton-code/)
 * Just wondering if there is a way to use short codes within the
    pre tags of Crayon
   Code. I want to be able to display customized code within using another short
   code to output the content.
 * [https://wordpress.org/plugins/crayon-syntax-highlighter/](https://wordpress.org/plugins/crayon-syntax-highlighter/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [TomJohnson](https://wordpress.org/support/users/tomjohnson/)
 * (@tomjohnson)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/shortcode-within-craton-code/#post-5117415)
 * I’m wondering this too. I want to use a shortcode like [product] or something
   in the code, but crayon doesn’t recognize the shortcode. Did you ever find a 
   solution to this?
 *  [DannyAnthony](https://wordpress.org/support/users/dannyanthony/)
 * (@dannyanthony)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/shortcode-within-craton-code/#post-5117418)
 * I’m also looking for a solution. I’ve tried using the following (and some combinations
   as well):
 *     ```
       [plain][myshortcode][/plain] inside the main pre
       [html][myshortcode][/html] inside the main pre
       <code> and a nested <pre>
       myshortcode & other escape methods
       highlight="false" attribute inside a nested pre & a code
       crayon="false" attribute inside a nested pre & a code
       ticking/unticking show_mixed
       ```
   
 * As you can see, I’ve tried a mixed bag in desperation. I really just want to 
   highlight a single line of php code with a very simple shortcode (just shows 
   the current year) inside it like:
 * `<?php somefunction('[myshortcode]'); ?>`
 * so the visitor sees
    `<?php somefunction('2014'); ?>`

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Shortcode within Craton Code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/crayon-syntax-highlighter_b0c4c0.
   svg)
 * [Crayon Syntax Highlighter](https://wordpress.org/plugins/crayon-syntax-highlighter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/crayon-syntax-highlighter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/crayon-syntax-highlighter/)
 * [Active Topics](https://wordpress.org/support/plugin/crayon-syntax-highlighter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/crayon-syntax-highlighter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/crayon-syntax-highlighter/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [DannyAnthony](https://wordpress.org/support/users/dannyanthony/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/shortcode-within-craton-code/#post-5117418)
 * Status: not resolved